[][src]Struct sn0int::models::NewNetworkDevice

pub struct NewNetworkDevice<'a> {
    pub network_id: i32,
    pub device_id: i32,
    pub ipaddr: Option<&'a String>,
    pub last_seen: Option<NaiveDateTime>,
}

Fields

network_id: i32device_id: i32ipaddr: Option<&'a String>last_seen: Option<NaiveDateTime>

Trait Implementations

impl<'a> Upsertable<NetworkDevice> for NewNetworkDevice<'a>
[src]

type Update = NetworkDeviceUpdate

fn upsert_str(
    insert: Option<&String>,
    existing: &Option<String>
) -> Option<String>
[src]

fn upsert_bytes(
    insert: Option<&Vec<u8>>,
    existing: &Option<Vec<u8>>
) -> Option<Vec<u8>>
[src]

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

impl<'a, 'insert> Insertable<table> for NewNetworkDevice<'a>
[src]

type Values = <(Option<Eq<network_id, i32>>, Option<Eq<device_id, i32>>, Option<Eq<ipaddr, &'a String>>, Option<Eq<last_seen, NaiveDateTime>>) as Insertable<table>>::Values

The VALUES clause to insert these records Read more

fn insert_into(
    self,
    table: T
) -> InsertStatement<T, Self::Values, Insert, NoReturningClause>
[src]

Insert self into a given table. Read more

impl<'a, 'insert> Insertable<table> for &'insert NewNetworkDevice<'a>
[src]

type Values = <(Option<Eq<network_id, &'insert i32>>, Option<Eq<device_id, &'insert i32>>, Option<Eq<ipaddr, &'insert &'a String>>, Option<Eq<last_seen, &'insert NaiveDateTime>>) as Insertable<table>>::Values

The VALUES clause to insert these records Read more

fn insert_into(
    self,
    table: T
) -> InsertStatement<T, Self::Values, Insert, NoReturningClause>
[src]

Insert self into a given table. Read more

impl<'a, 'insert> UndecoratedInsertRecord<table> for NewNetworkDevice<'a>
[src]

Auto Trait Implementations

impl<'a> Send for NewNetworkDevice<'a>

impl<'a> Sync for NewNetworkDevice<'a>

Blanket Implementations

impl<T> From for T
[src]

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

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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<T> Erased for T