Mens rea is one of the two elements of a crime the Crown must prove beyond a reasonable doubt to prove your guilt. If refers to your guilty state of mind.
For most crimes, the state of mind required is either you intended to do the act or you were reckless about the effect of your act. It doesn’t matter if you didn’t know the act was illegal. Not knowing the law is not an excuse or defence.