[][src]Struct sn0int::models::NewDevice

pub struct NewDevice<'a> {
    pub value: &'a str,
    pub name: Option<&'a String>,
    pub hostname: Option<&'a String>,
    pub vendor: Option<&'a String>,
    pub last_seen: Option<NaiveDateTime>,
}

Fields

value: &'a strname: Option<&'a String>hostname: Option<&'a String>vendor: Option<&'a String>last_seen: Option<NaiveDateTime>

Trait Implementations

impl<'a> InsertableStruct<Device> for NewDevice<'a>
[src]

impl<'a> Upsertable<Device> for NewDevice<'a>
[src]

type Update = DeviceUpdate

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 NewDevice<'a>
[src]

type Values = <(Option<Eq<value, &'a str>>, Option<Eq<name, &'a String>>, Option<Eq<hostname, &'a String>>, Option<Eq<vendor, &'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 NewDevice<'a>
[src]

type Values = <(Option<Eq<value, &'insert &'a str>>, Option<Eq<name, &'insert &'a String>>, Option<Eq<hostname, &'insert &'a String>>, Option<Eq<vendor, &'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 NewDevice<'a>
[src]

Auto Trait Implementations

impl<'a> Send for NewDevice<'a>

impl<'a> Sync for NewDevice<'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