Struct sn0int::models::AccountUpdate
source · pub struct AccountUpdate {
pub id: i32,
pub displayname: Option<String>,
pub email: Option<String>,
pub url: Option<String>,
pub last_seen: Option<NaiveDateTime>,
pub birthday: Option<String>,
pub phonenumber: Option<String>,
pub profile_pic: Option<String>,
}
Fields§
§id: i32
§displayname: Option<String>
§email: Option<String>
§url: Option<String>
§last_seen: Option<NaiveDateTime>
§birthday: Option<String>
§phonenumber: Option<String>
§profile_pic: Option<String>
Trait Implementations§
source§impl<'update> AsChangeset for &'update AccountUpdate
impl<'update> AsChangeset for &'update AccountUpdate
§type Changeset = <(Option<Eq<displayname, <&'update String as AsExpression<<displayname as Expression>::SqlType>>::Expression>>, Option<Eq<email, <&'update String as AsExpression<<email as Expression>::SqlType>>::Expression>>, Option<Eq<url, <&'update String as AsExpression<<url as Expression>::SqlType>>::Expression>>, Option<Eq<last_seen, <&'update NaiveDateTime as AsExpression<<last_seen as Expression>::SqlType>>::Expression>>, Option<Eq<birthday, <&'update String as AsExpression<<birthday as Expression>::SqlType>>::Expression>>, Option<Eq<phonenumber, <&'update String as AsExpression<<phonenumber as Expression>::SqlType>>::Expression>>, Option<Eq<profile_pic, <&'update String as AsExpression<<profile_pic as Expression>::SqlType>>::Expression>>) as AsChangeset>::Changeset
type Changeset = <(Option<Eq<displayname, <&'update String as AsExpression<<displayname as Expression>::SqlType>>::Expression>>, Option<Eq<email, <&'update String as AsExpression<<email as Expression>::SqlType>>::Expression>>, Option<Eq<url, <&'update String as AsExpression<<url as Expression>::SqlType>>::Expression>>, Option<Eq<last_seen, <&'update NaiveDateTime as AsExpression<<last_seen as Expression>::SqlType>>::Expression>>, Option<Eq<birthday, <&'update String as AsExpression<<birthday as Expression>::SqlType>>::Expression>>, Option<Eq<phonenumber, <&'update String as AsExpression<<phonenumber as Expression>::SqlType>>::Expression>>, Option<Eq<profile_pic, <&'update String as AsExpression<<profile_pic as Expression>::SqlType>>::Expression>>) as AsChangeset>::Changeset
The update statement this type represents
source§fn as_changeset(self) -> Self::Changeset
fn as_changeset(self) -> Self::Changeset
Convert
self
into the actual update statement being executedsource§impl<'update> AsChangeset for AccountUpdate
impl<'update> AsChangeset for AccountUpdate
§type Changeset = <(Option<Eq<displayname, <String as AsExpression<<displayname as Expression>::SqlType>>::Expression>>, Option<Eq<email, <String as AsExpression<<email as Expression>::SqlType>>::Expression>>, Option<Eq<url, <String as AsExpression<<url as Expression>::SqlType>>::Expression>>, Option<Eq<last_seen, <NaiveDateTime as AsExpression<<last_seen as Expression>::SqlType>>::Expression>>, Option<Eq<birthday, <String as AsExpression<<birthday as Expression>::SqlType>>::Expression>>, Option<Eq<phonenumber, <String as AsExpression<<phonenumber as Expression>::SqlType>>::Expression>>, Option<Eq<profile_pic, <String as AsExpression<<profile_pic as Expression>::SqlType>>::Expression>>) as AsChangeset>::Changeset
type Changeset = <(Option<Eq<displayname, <String as AsExpression<<displayname as Expression>::SqlType>>::Expression>>, Option<Eq<email, <String as AsExpression<<email as Expression>::SqlType>>::Expression>>, Option<Eq<url, <String as AsExpression<<url as Expression>::SqlType>>::Expression>>, Option<Eq<last_seen, <NaiveDateTime as AsExpression<<last_seen as Expression>::SqlType>>::Expression>>, Option<Eq<birthday, <String as AsExpression<<birthday as Expression>::SqlType>>::Expression>>, Option<Eq<phonenumber, <String as AsExpression<<phonenumber as Expression>::SqlType>>::Expression>>, Option<Eq<profile_pic, <String as AsExpression<<profile_pic as Expression>::SqlType>>::Expression>>) as AsChangeset>::Changeset
The update statement this type represents
source§fn as_changeset(self) -> Self::Changeset
fn as_changeset(self) -> Self::Changeset
Convert
self
into the actual update statement being executedsource§impl Debug for AccountUpdate
impl Debug for AccountUpdate
source§impl<'de> Deserialize<'de> for AccountUpdate
impl<'de> Deserialize<'de> for AccountUpdate
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl HasTable for AccountUpdate
impl HasTable for AccountUpdate
source§impl<'ident> Identifiable for &'ident AccountUpdate
impl<'ident> Identifiable for &'ident AccountUpdate
source§impl Serialize for AccountUpdate
impl Serialize for AccountUpdate
source§impl Updateable<Account> for AccountUpdate
impl Updateable<Account> for AccountUpdate
fn changeset(&mut self, existing: &Account)
fn fmt(&self, updates: &mut Vec<String>, colors: bool)
fn to_plain_str(&self) -> String
fn to_term_str(&self) -> String
fn clear_if_equal<T: PartialEq>(update: &mut Option<T>, existing: &Option<T>)
fn clear_if_lower_or_equal<T: PartialOrd>( update: &mut Option<T>, existing: &Option<T> )
fn clear_if_greater_or_equal<T: PartialOrd>( update: &mut Option<T>, existing: &Option<T> )
fn push_value<D: Debug>( updates: &mut Vec<String>, name: &str, value: &Option<D>, colors: bool )
fn push_raw<T: AsRef<str>>( updates: &mut Vec<String>, name: &str, value: Option<T>, colors: bool )
Auto Trait Implementations§
impl RefUnwindSafe for AccountUpdate
impl Send for AccountUpdate
impl Sync for AccountUpdate
impl Unpin for AccountUpdate
impl UnwindSafe for AccountUpdate
Blanket Implementations§
§impl<'a, T> AsTaggedExplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedExplicit<'a> for Twhere T: 'a,
§impl<'a, T> AsTaggedImplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedImplicit<'a> for Twhere T: 'a,
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<T> IntoSql for T
impl<T> IntoSql for T
source§fn into_sql<T>(self) -> Self::Expressionwhere
Self: AsExpression<T> + Sized,
fn into_sql<T>(self) -> Self::Expressionwhere Self: AsExpression<T> + Sized,
Convert
self
to an expression for Diesel’s query builder. Read moresource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere &'a Self: AsExpression<T>,
Convert
&self
to an expression for Diesel’s query builder. Read more