pub struct User {
pub id: UserId,
pub github_login: String,
pub github_user_id: Option<i32>,
pub email_address: Option<String>,
pub admin: bool,
pub invite_code: Option<String>,
pub invite_count: i32,
pub inviter_id: Option<UserId>,
pub connected_once: bool,
pub metrics_id: Uuid,
}
Fields§
§id: UserId
§github_login: String
§github_user_id: Option<i32>
§email_address: Option<String>
§admin: bool
§invite_code: Option<String>
§invite_count: i32
§inviter_id: Option<UserId>
§connected_once: bool
§metrics_id: Uuid
Trait Implementations§
source§impl FromQueryResult for Model
impl FromQueryResult for Model
source§fn from_query_result(row: &QueryResult, pre: &str) -> Result<Self, DbErr>
fn from_query_result(row: &QueryResult, pre: &str) -> Result<Self, DbErr>
Instantiate a Model from a [QueryResult]
§fn from_query_result_optional(
res: &QueryResult,
pre: &str
) -> Result<Option<Self>, DbErr>
fn from_query_result_optional( res: &QueryResult, pre: &str ) -> Result<Option<Self>, DbErr>
Transform the error from instantiating a Model from a [QueryResult]
and converting it to an Option
§fn find_by_statement(stmt: Statement) -> SelectorRaw<SelectModel<Self>>
fn find_by_statement(stmt: Statement) -> SelectorRaw<SelectModel<Self>>
source§impl ModelTrait for Model
impl ModelTrait for Model
type Entity = Entity
source§fn get(&self, c: <Self::Entity as EntityTrait>::Column) -> Value
fn get(&self, c: <Self::Entity as EntityTrait>::Column) -> Value
Get the [Value] of a column from an Entity
source§fn set(&mut self, c: <Self::Entity as EntityTrait>::Column, v: Value)
fn set(&mut self, c: <Self::Entity as EntityTrait>::Column, v: Value)
Set the [Value] of a column in an Entity
Find related Models
§fn find_linked<L>(&self, l: L) -> Select<<L as Linked>::ToEntity>where
L: Linked<FromEntity = Self::Entity>,
fn find_linked<L>(&self, l: L) -> Select<<L as Linked>::ToEntity>where L: Linked<FromEntity = Self::Entity>,
Find linked Models
§fn delete<'a, 'async_trait, A, C>(
self,
db: &'a C
) -> Pin<Box<dyn Future<Output = Result<DeleteResult, DbErr>> + Send + 'async_trait, Global>>where
'a: 'async_trait,
Self: IntoActiveModel<A> + 'async_trait,
C: ConnectionTrait + 'async_trait,
A: ActiveModelTrait<Entity = Self::Entity> + ActiveModelBehavior + Send + 'a + 'async_trait,
fn delete<'a, 'async_trait, A, C>( self, db: &'a C ) -> Pin<Box<dyn Future<Output = Result<DeleteResult, DbErr>> + Send + 'async_trait, Global>>where 'a: 'async_trait, Self: IntoActiveModel<A> + 'async_trait, C: ConnectionTrait + 'async_trait, A: ActiveModelTrait<Entity = Self::Entity> + ActiveModelBehavior + Send + 'a + 'async_trait,
Delete a model
source§impl PartialEq<Model> for Model
impl PartialEq<Model> for Model
impl Eq for Model
impl StructuralEq for Model
impl StructuralPartialEq for Model
Auto Trait Implementations§
impl RefUnwindSafe for Model
impl Send for Model
impl Sync for Model
impl Unpin for Model
impl UnwindSafe for Model
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> Serialize for Twhere
T: Serialize + ?Sized,
impl<T> Serialize for Twhere T: Serialize + ?Sized,
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>
§impl<C> SignWithKey<String> for Cwhere
C: ToBase64,
impl<C> SignWithKey<String> for Cwhere C: ToBase64,
fn sign_with_key(self, key: &impl SigningAlgorithm) -> Result<String, Error>
§impl<M> TryIntoModel<M> for Mwhere
M: ModelTrait,
impl<M> TryIntoModel<M> for Mwhere M: ModelTrait,
§fn try_into_model(self) -> Result<M, DbErr>
fn try_into_model(self) -> Result<M, DbErr>
Method to call to perform the conversion