Error message reads: move occurs because self.username has type String, which does not implement the Copy trait
I wasn't expecting that returning the value of a field would be so complicated. What exactly would you do to get this to work. After an hour of searching the Internet I haven't found a single example of how to do this.
It's not complicated, but you have to understand the ownership model.
String is an owning type: it internally manages a growable heap buffer in which it actually stores its contents. Therefore, it has a destructor, and every String value must have exactly one owner (it can be assigned to a single variable, if that's how you like to call it). So, for example, if you assign the value of a String-typed variable to another one, the original one will be moved from and invalidated, so as to ensure that no double free occurs (this is one fundamental way of ensuring memory safety).
What your get_name() function tries to do in its current form is move out of the self.username field, since you are attempting to return the field by value. That can't possibly work, if you think about it: this would invalidate the field of self, but that's not allowed, because references (in this case, self) must always point to a value that is completely valid. (There are good reasons for this, but I'm not going to get into them now.)
What you have to decide is: how do you want to resolve this problem? Do you want to…
return a reference to the field, or
return a copy of the field?
If you want the former, you can declare the function to return a &String (by-ref) instead of a String (by-value), and return &self.username. If the latter, you can keep the signature unchanged and return self.username.clone(), explicitly copying the string.