[][src]Struct sn0int::models::Url

pub struct Url {
    pub id: i32,
    pub subdomain_id: i32,
    pub value: String,
    pub path: String,
    pub status: Option<i32>,
    pub body: Option<Vec<u8>>,
    pub unscoped: bool,
    pub online: Option<bool>,
    pub title: Option<String>,
    pub redirect: Option<String>,
}

Fields

id: i32subdomain_id: i32value: Stringpath: Stringstatus: Option<i32>body: Option<Vec<u8>>unscoped: boolonline: Option<bool>title: Option<String>redirect: Option<String>

Trait Implementations

impl Model for Url[src]

type ID = str

fn filter_with_param(
    _db: &Database,
    _filter: &Filter,
    _param: &str
) -> Result<Vec<Self>>
[src]

fn get_id(db: &Database, query: &Self::ID) -> Result<i32>[src]

fn get_id_opt(db: &Database, query: &Self::ID) -> Result<Option<i32>>[src]

fn blob(&self) -> Option<&str>[src]

impl Scopable for Url[src]

impl InsertableStruct<Url> for NewUrl[src]

impl Upsertable<Url> for NewUrl[src]

type Update = UrlUpdate

fn upsert_opt<T: PartialEq>(
    insert: Option<T>,
    existing: &Option<T>
) -> Option<T>
[src]

impl Updateable<Url> for UrlUpdate[src]

fn to_string(&self) -> String[src]

fn clear_if_equal<T: PartialEq>(update: &mut Option<T>, existing: &Option<T>)[src]

fn push_value<D: Debug>(
    updates: &mut Vec<String>,
    name: &str,
    value: &Option<D>
)
[src]

fn push_raw<T: AsRef<str>>(
    updates: &mut Vec<String>,
    name: &str,
    value: Option<T>
)
[src]

impl Printable<PrintableUrl> for Url[src]

impl Detailed for Url[src]

type T = DetailedUrl

impl PartialEq<Url> for Url[src]

impl Debug for Url[src]

impl<__FK> BelongsTo<Subdomain> for Url where
    __FK: Hash + Eq,
    &'__a i32: Into<Option<&'__a __FK>>,
    &'__a Subdomain: Identifiable<Id = &'__a __FK>, 
[src]

type ForeignKey = __FK

The foreign key of this struct

type ForeignKeyColumn = subdomain_id

The database column representing the foreign key of the table this struct represents Read more

impl<__DB: Backend, __ST> Queryable<__ST, __DB> for Url where
    (i32, i32, String, String, Option<i32>, Option<Vec<u8>>, bool, Option<bool>, Option<String>, Option<String>): Queryable<__ST, __DB>, 
[src]

type Row = <(i32, i32, String, String, Option<i32>, Option<Vec<u8>>, bool, Option<bool>, Option<String>, Option<String>) as Queryable<__ST, __DB>>::Row

The Rust type you'd like to map from. Read more

impl HasTable for Url[src]

type Table = table

The table this type is associated with.

impl<'ident> Identifiable for &'ident Url[src]

type Id = &'ident i32

The type of this struct's identifier. Read more

impl Serialize for Url[src]

impl<'de> Deserialize<'de> for Url[src]

Auto Trait Implementations

impl Send for Url

impl Sync for Url

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> IntoSql for T[src]

fn into_sql<T>(self) -> Self::Expression where
    Self: AsExpression<T>, 
[src]

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]

Convert &self to an expression for Diesel's query builder. Read more

impl<'a, Parent, Child> BelongingToDsl for Child where
    Child: BelongingToDsl<&'a [Parent]>, 
[src]

type Output = <Child as BelongingToDsl<&'a [Parent]>>::Output

The query returned by belonging_to

impl<'a, Parent, Child> BelongingToDsl for Child where
    Child: HasTable + BelongsTo<Parent>,
    &'a Parent: Identifiable,
    <&'a Parent as Identifiable>::Id: AsExpression<<<Child as BelongsTo<Parent>>::ForeignKeyColumn as Expression>::SqlType>,
    <Child as HasTable>::Table: FilterDsl<Eq<<Child as BelongsTo<Parent>>::ForeignKeyColumn, <<&'a Parent as Identifiable>::Id as AsExpression<<<Child as BelongsTo<Parent>>::ForeignKeyColumn as Expression>::SqlType>>::Expression>>,
    <Child as BelongsTo<Parent>>::ForeignKeyColumn: ExpressionMethods
[src]

type Output = <<Child as HasTable>::Table as FilterDsl<Eq<<Child as BelongsTo<Parent>>::ForeignKeyColumn, <<&'a Parent as Identifiable>::Id as AsExpression<<<Child as BelongsTo<Parent>>::ForeignKeyColumn as Expression>::SqlType>>::Expression>>>::Output

The query returned by belonging_to

impl<'a, Parent, Child> BelongingToDsl for Child where
    Child: HasTable + BelongsTo<Parent>,
    &'a Parent: Identifiable,
    Vec<<&'a Parent as Identifiable>::Id>: AsInExpression<<<Child as BelongsTo<Parent>>::ForeignKeyColumn as Expression>::SqlType>,
    <Child as HasTable>::Table: FilterDsl<In<<Child as BelongsTo<Parent>>::ForeignKeyColumn, <Vec<<&'a Parent as Identifiable>::Id> as AsInExpression<<<Child as BelongsTo<Parent>>::ForeignKeyColumn as Expression>::SqlType>>::InExpression>>,
    <Child as BelongsTo<Parent>>::ForeignKeyColumn: ExpressionMethods
[src]

type Output = <<Child as HasTable>::Table as FilterDsl<In<<Child as BelongsTo<Parent>>::ForeignKeyColumn, <Vec<<&'a Parent as Identifiable>::Id> as AsInExpression<<<Child as BelongsTo<Parent>>::ForeignKeyColumn as Expression>::SqlType>>::InExpression>>>::Output

The query returned by belonging_to

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Erased for T

impl<T> Same for T

type Output = T

Should always be Self

impl<T> SetParameter for T

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 

Sets value as a parameter of self.