Account

Trait Account 

Source
pub trait Account:
    Serialize
    + DeserializeOwned
    + Debug
    + 'static {
    // Required method
    fn email(&self) -> &str;
}
Expand description

A struct that implements this trait represents the data that is stored with each account in the authentication system. The only mandatory data to st ore in an account is the email that the account is associated with. The password should not be stored here. Your account object’s data and the password, taken together, are usually one row in a SQL database (although other database types can be used as this library does not interact with the database), where the email is the primary key. Note that this data is viewable to the user as it is stored in an unencrypted (but signed) json web token!

Required Methods§

Source

fn email(&self) -> &str

Gets the email associated with this account.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§