pub trait AuthUser:
Clone
+ Send
+ Sync
+ 'static {
type Id: Clone + Send + Sync + Debug + Serialize + DeserializeOwned + Into<Value> + 'static;
// Required methods
fn id(&self) -> Self::Id;
fn email(&self) -> &str;
fn password_digest(&self) -> Option<&str>;
fn find_by_email(
db: &DatabaseConnection,
email: &str,
) -> impl Future<Output = Result<Option<Self>>> + Send;
fn find_by_id(
db: &DatabaseConnection,
id: Self::Id,
) -> impl Future<Output = Result<Option<Self>>> + Send;
}Expand description
The contract your User SeaORM model implements (manually or via #[auth_user]).
Required Associated Types§
Required Methods§
fn id(&self) -> Self::Id
fn email(&self) -> &str
fn password_digest(&self) -> Option<&str>
fn find_by_email( db: &DatabaseConnection, email: &str, ) -> impl Future<Output = Result<Option<Self>>> + Send
fn find_by_id( db: &DatabaseConnection, id: Self::Id, ) -> impl Future<Output = Result<Option<Self>>> + Send
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".