[−][src]Struct sudoku_backend::ops::SanitisedUserData
Data returned to authenticating client, with a free conversion from a User
.
Consult doc/user.md
for more details.
Examples
assert_eq!(SanitisedUserData::from(User { id: Some(12), username: "karolsw3".to_string(), password: "$rscrypt$0$EAgC$p9qwIwAVjdqhKvTR+&c.".to_string(), email: "karol.sw3@gmail.com".to_string(), created_at: NaiveDate::from_ymd(2018, 7, 7).and_hms(17, 6, 29), is_admin: true, points_total: 1750, games_total: 3, games_total_easy: 2, games_total_medium: 1, games_total_hard: 0, }), SanitisedUserData { username: "karolsw3".to_string(), created_at: DateTime::parse_from_rfc3339("2018-07-07T17:06:29Z").unwrap(), is_admin: true, points_total: 1750, games_total: 3, games_total_easy: 2, games_total_medium: 1, games_total_hard: 0, });
Fields
username: String
User's name or "login" or whatever.
created_at: DateTime<FixedOffset>
Time user was created.
is_admin: bool
Whether the user has administrative privileges.
points_total: u64
Sum total of the user's points, calculated according to
doc/scoring.md#endgame-formula
.
games_total: u64
Total amount of games played.
games_total_easy: u64
Amount easy of games played.
games_total_medium: u64
Amount medium of games played.
games_total_hard: u64
Amount hard of games played.
Trait Implementations
impl PartialEq<SanitisedUserData> for SanitisedUserData
[src]
impl PartialEq<SanitisedUserData> for SanitisedUserData
fn eq(&self, other: &SanitisedUserData) -> bool
[src]
fn eq(&self, other: &SanitisedUserData) -> bool
fn ne(&self, other: &SanitisedUserData) -> bool
[src]
fn ne(&self, other: &SanitisedUserData) -> bool
impl Clone for SanitisedUserData
[src]
impl Clone for SanitisedUserData
fn clone(&self) -> SanitisedUserData
[src]
fn clone(&self) -> SanitisedUserData
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl From<User> for SanitisedUserData
[src]
impl From<User> for SanitisedUserData
fn from(u: User) -> SanitisedUserData
[src]
fn from(u: User) -> SanitisedUserData
impl Ord for SanitisedUserData
[src]
impl Ord for SanitisedUserData
fn cmp(&self, other: &SanitisedUserData) -> Ordering
[src]
fn cmp(&self, other: &SanitisedUserData) -> Ordering
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl Eq for SanitisedUserData
[src]
impl Eq for SanitisedUserData
impl PartialOrd<SanitisedUserData> for SanitisedUserData
[src]
impl PartialOrd<SanitisedUserData> for SanitisedUserData
fn partial_cmp(&self, other: &SanitisedUserData) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &SanitisedUserData) -> Option<Ordering>
fn lt(&self, other: &SanitisedUserData) -> bool
[src]
fn lt(&self, other: &SanitisedUserData) -> bool
fn le(&self, other: &SanitisedUserData) -> bool
[src]
fn le(&self, other: &SanitisedUserData) -> bool
fn gt(&self, other: &SanitisedUserData) -> bool
[src]
fn gt(&self, other: &SanitisedUserData) -> bool
fn ge(&self, other: &SanitisedUserData) -> bool
[src]
fn ge(&self, other: &SanitisedUserData) -> bool
impl Debug for SanitisedUserData
[src]
impl Debug for SanitisedUserData
impl Hash for SanitisedUserData
[src]
impl Hash for SanitisedUserData
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Serialize for SanitisedUserData
[src]
impl Serialize for SanitisedUserData
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
impl<'de> Deserialize<'de> for SanitisedUserData
[src]
impl<'de> Deserialize<'de> for SanitisedUserData
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Auto Trait Implementations
impl Send for SanitisedUserData
impl Send for SanitisedUserData
impl Sync for SanitisedUserData
impl Sync for SanitisedUserData
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
impl<T> Typeable for T where
T: Any,
[src]
impl<T> Typeable for T where
T: Any,
impl<T> IntoSql for T
[src]
impl<T> IntoSql for T
fn into_sql<T>(self) -> Self::Expression where
Self: AsExpression<T>,
[src]
fn into_sql<T>(self) -> Self::Expression where
Self: AsExpression<T>,
Convert self
to an expression for Diesel's query builder. Read more
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
[src]
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
Convert &self
to an expression for Diesel's query builder. Read more