[][src]Struct sn0int::models::NetworkDevice

pub struct NetworkDevice {
    pub id: i32,
    pub network_id: i32,
    pub device_id: i32,
    pub ipaddr: Option<String>,
    pub last_seen: Option<NaiveDateTime>,
}

Fields

id: i32network_id: i32device_id: i32ipaddr: Option<String>last_seen: Option<NaiveDateTime>

Methods

impl NetworkDevice[src]

pub fn network(&self, db: &Database) -> Result<Network>[src]

Trait Implementations

impl Model for NetworkDevice[src]

type ID = (i32, i32)

impl Upsertable<NetworkDevice> for NewNetworkDevice[src]

type Update = NetworkDeviceUpdate

impl Updateable<NetworkDevice> for NetworkDeviceUpdate[src]

impl Printable<PrintableNetworkDevice> for NetworkDevice[src]

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

type ForeignKey = __FK

The foreign key of this struct

type ForeignKeyColumn = network_id

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

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

type ForeignKey = __FK

The foreign key of this struct

type ForeignKeyColumn = device_id

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

impl HasTable for NetworkDevice[src]

type Table = table

The table this type is associated with.

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

type Id = &'ident i32

The type of this struct's identifier. Read more

impl<__DB: Backend, __ST> Queryable<__ST, __DB> for NetworkDevice where
    (i32, i32, i32, Option<String>, Option<NaiveDateTime>): Queryable<__ST, __DB>, 
[src]

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

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

impl Serialize for NetworkDevice[src]

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

Auto Trait Implementations

Blanket Implementations

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

impl<T> From<T> for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> 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> Borrow<T> for T where
    T: ?Sized
[src]

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

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

impl<T> IntoSql for T[src]

impl<'a, Parent, Child> BelongingToDsl<&'a Vec<Parent>> 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<&'a Parent> 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<&'a [Parent]> 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<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SetParameter for T