Struct sn0int::models::ImageUpdate
source · pub struct ImageUpdate {
pub id: i32,
pub filename: Option<String>,
pub mime: Option<String>,
pub width: Option<i32>,
pub height: Option<i32>,
pub created: Option<NaiveDateTime>,
pub latitude: Option<f32>,
pub longitude: Option<f32>,
pub nudity: Option<f32>,
pub ahash: Option<String>,
pub dhash: Option<String>,
pub phash: Option<String>,
}
Fields§
§id: i32
§filename: Option<String>
§mime: Option<String>
§width: Option<i32>
§height: Option<i32>
§created: Option<NaiveDateTime>
§latitude: Option<f32>
§longitude: Option<f32>
§nudity: Option<f32>
§ahash: Option<String>
§dhash: Option<String>
§phash: Option<String>
Trait Implementations§
source§impl<'update> AsChangeset for &'update ImageUpdate
impl<'update> AsChangeset for &'update ImageUpdate
§type Changeset = <(Option<Eq<filename, <&'update String as AsExpression<<filename as Expression>::SqlType>>::Expression>>, Option<Eq<mime, <&'update String as AsExpression<<mime as Expression>::SqlType>>::Expression>>, Option<Eq<width, <&'update i32 as AsExpression<<width as Expression>::SqlType>>::Expression>>, Option<Eq<height, <&'update i32 as AsExpression<<height as Expression>::SqlType>>::Expression>>, Option<Eq<created, <&'update NaiveDateTime as AsExpression<<created as Expression>::SqlType>>::Expression>>, Option<Eq<latitude, <&'update f32 as AsExpression<<latitude as Expression>::SqlType>>::Expression>>, Option<Eq<longitude, <&'update f32 as AsExpression<<longitude as Expression>::SqlType>>::Expression>>, Option<Eq<nudity, <&'update f32 as AsExpression<<nudity as Expression>::SqlType>>::Expression>>, Option<Eq<ahash, <&'update String as AsExpression<<ahash as Expression>::SqlType>>::Expression>>, Option<Eq<dhash, <&'update String as AsExpression<<dhash as Expression>::SqlType>>::Expression>>, Option<Eq<phash, <&'update String as AsExpression<<phash as Expression>::SqlType>>::Expression>>) as AsChangeset>::Changeset
type Changeset = <(Option<Eq<filename, <&'update String as AsExpression<<filename as Expression>::SqlType>>::Expression>>, Option<Eq<mime, <&'update String as AsExpression<<mime as Expression>::SqlType>>::Expression>>, Option<Eq<width, <&'update i32 as AsExpression<<width as Expression>::SqlType>>::Expression>>, Option<Eq<height, <&'update i32 as AsExpression<<height as Expression>::SqlType>>::Expression>>, Option<Eq<created, <&'update NaiveDateTime as AsExpression<<created as Expression>::SqlType>>::Expression>>, Option<Eq<latitude, <&'update f32 as AsExpression<<latitude as Expression>::SqlType>>::Expression>>, Option<Eq<longitude, <&'update f32 as AsExpression<<longitude as Expression>::SqlType>>::Expression>>, Option<Eq<nudity, <&'update f32 as AsExpression<<nudity as Expression>::SqlType>>::Expression>>, Option<Eq<ahash, <&'update String as AsExpression<<ahash as Expression>::SqlType>>::Expression>>, Option<Eq<dhash, <&'update String as AsExpression<<dhash as Expression>::SqlType>>::Expression>>, Option<Eq<phash, <&'update String as AsExpression<<phash 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 ImageUpdate
impl<'update> AsChangeset for ImageUpdate
§type Changeset = <(Option<Eq<filename, <String as AsExpression<<filename as Expression>::SqlType>>::Expression>>, Option<Eq<mime, <String as AsExpression<<mime as Expression>::SqlType>>::Expression>>, Option<Eq<width, <i32 as AsExpression<<width as Expression>::SqlType>>::Expression>>, Option<Eq<height, <i32 as AsExpression<<height as Expression>::SqlType>>::Expression>>, Option<Eq<created, <NaiveDateTime as AsExpression<<created as Expression>::SqlType>>::Expression>>, Option<Eq<latitude, <f32 as AsExpression<<latitude as Expression>::SqlType>>::Expression>>, Option<Eq<longitude, <f32 as AsExpression<<longitude as Expression>::SqlType>>::Expression>>, Option<Eq<nudity, <f32 as AsExpression<<nudity as Expression>::SqlType>>::Expression>>, Option<Eq<ahash, <String as AsExpression<<ahash as Expression>::SqlType>>::Expression>>, Option<Eq<dhash, <String as AsExpression<<dhash as Expression>::SqlType>>::Expression>>, Option<Eq<phash, <String as AsExpression<<phash as Expression>::SqlType>>::Expression>>) as AsChangeset>::Changeset
type Changeset = <(Option<Eq<filename, <String as AsExpression<<filename as Expression>::SqlType>>::Expression>>, Option<Eq<mime, <String as AsExpression<<mime as Expression>::SqlType>>::Expression>>, Option<Eq<width, <i32 as AsExpression<<width as Expression>::SqlType>>::Expression>>, Option<Eq<height, <i32 as AsExpression<<height as Expression>::SqlType>>::Expression>>, Option<Eq<created, <NaiveDateTime as AsExpression<<created as Expression>::SqlType>>::Expression>>, Option<Eq<latitude, <f32 as AsExpression<<latitude as Expression>::SqlType>>::Expression>>, Option<Eq<longitude, <f32 as AsExpression<<longitude as Expression>::SqlType>>::Expression>>, Option<Eq<nudity, <f32 as AsExpression<<nudity as Expression>::SqlType>>::Expression>>, Option<Eq<ahash, <String as AsExpression<<ahash as Expression>::SqlType>>::Expression>>, Option<Eq<dhash, <String as AsExpression<<dhash as Expression>::SqlType>>::Expression>>, Option<Eq<phash, <String as AsExpression<<phash 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 ImageUpdate
impl Debug for ImageUpdate
source§impl<'de> Deserialize<'de> for ImageUpdate
impl<'de> Deserialize<'de> for ImageUpdate
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 ImageUpdate
impl HasTable for ImageUpdate
source§impl<'ident> Identifiable for &'ident ImageUpdate
impl<'ident> Identifiable for &'ident ImageUpdate
source§impl Serialize for ImageUpdate
impl Serialize for ImageUpdate
source§impl Updateable<Image> for ImageUpdate
impl Updateable<Image> for ImageUpdate
fn changeset(&mut self, existing: &Image)
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 ImageUpdate
impl Send for ImageUpdate
impl Sync for ImageUpdate
impl Unpin for ImageUpdate
impl UnwindSafe for ImageUpdate
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