Struct sn0int::models::NewNetworkDevice
source · pub struct NewNetworkDevice {
pub network_id: i32,
pub device_id: i32,
pub ipaddr: Option<String>,
pub last_seen: Option<NaiveDateTime>,
}
Fields§
§network_id: i32
§device_id: i32
§ipaddr: Option<String>
§last_seen: Option<NaiveDateTime>
Trait Implementations§
source§impl Clone for NewNetworkDevice
impl Clone for NewNetworkDevice
source§fn clone(&self) -> NewNetworkDevice
fn clone(&self) -> NewNetworkDevice
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for NewNetworkDevice
impl Debug for NewNetworkDevice
source§impl<'de> Deserialize<'de> for NewNetworkDevice
impl<'de> Deserialize<'de> for NewNetworkDevice
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<'insert> Insertable<table> for &'insert NewNetworkDevice
impl<'insert> Insertable<table> for &'insert NewNetworkDevice
§type Values = <(Option<Eq<network_id, <&'insert i32 as AsExpression<<network_id as Expression>::SqlType>>::Expression>>, Option<Eq<device_id, <&'insert i32 as AsExpression<<device_id as Expression>::SqlType>>::Expression>>, Option<Eq<ipaddr, <&'insert String as AsExpression<<ipaddr as Expression>::SqlType>>::Expression>>, Option<Eq<last_seen, <&'insert NaiveDateTime as AsExpression<<last_seen as Expression>::SqlType>>::Expression>>) as Insertable<table>>::Values
type Values = <(Option<Eq<network_id, <&'insert i32 as AsExpression<<network_id as Expression>::SqlType>>::Expression>>, Option<Eq<device_id, <&'insert i32 as AsExpression<<device_id as Expression>::SqlType>>::Expression>>, Option<Eq<ipaddr, <&'insert String as AsExpression<<ipaddr as Expression>::SqlType>>::Expression>>, Option<Eq<last_seen, <&'insert NaiveDateTime as AsExpression<<last_seen as Expression>::SqlType>>::Expression>>) as Insertable<table>>::Values
The
VALUES
clause to insert these records Read moresource§fn insert_into(
self,
table: T
) -> InsertStatement<T, Self::Values, Insert, NoReturningClause>where
Self: Sized,
fn insert_into( self, table: T ) -> InsertStatement<T, Self::Values, Insert, NoReturningClause>where Self: Sized,
Insert
self
into a given table. Read moresource§impl<'insert> Insertable<table> for NewNetworkDevice
impl<'insert> Insertable<table> for NewNetworkDevice
§type Values = <(Option<Eq<network_id, <i32 as AsExpression<<network_id as Expression>::SqlType>>::Expression>>, Option<Eq<device_id, <i32 as AsExpression<<device_id as Expression>::SqlType>>::Expression>>, Option<Eq<ipaddr, <String as AsExpression<<ipaddr as Expression>::SqlType>>::Expression>>, Option<Eq<last_seen, <NaiveDateTime as AsExpression<<last_seen as Expression>::SqlType>>::Expression>>) as Insertable<table>>::Values
type Values = <(Option<Eq<network_id, <i32 as AsExpression<<network_id as Expression>::SqlType>>::Expression>>, Option<Eq<device_id, <i32 as AsExpression<<device_id as Expression>::SqlType>>::Expression>>, Option<Eq<ipaddr, <String as AsExpression<<ipaddr as Expression>::SqlType>>::Expression>>, Option<Eq<last_seen, <NaiveDateTime as AsExpression<<last_seen as Expression>::SqlType>>::Expression>>) as Insertable<table>>::Values
The
VALUES
clause to insert these records Read moresource§fn insert_into(
self,
table: T
) -> InsertStatement<T, Self::Values, Insert, NoReturningClause>where
Self: Sized,
fn insert_into( self, table: T ) -> InsertStatement<T, Self::Values, Insert, NoReturningClause>where Self: Sized,
Insert
self
into a given table. Read moresource§impl Serialize for NewNetworkDevice
impl Serialize for NewNetworkDevice
source§impl Upsertable<NetworkDevice> for NewNetworkDevice
impl Upsertable<NetworkDevice> for NewNetworkDevice
type Update = NetworkDeviceUpdate
fn upsert(self, existing: &NetworkDevice) -> Self::Update
fn upsert_opt<T: PartialEq>( insert: Option<T>, existing: &Option<T> ) -> Option<T>
impl<'insert> UndecoratedInsertRecord<table> for NewNetworkDevice
Auto Trait Implementations§
impl RefUnwindSafe for NewNetworkDevice
impl Send for NewNetworkDevice
impl Sync for NewNetworkDevice
impl Unpin for NewNetworkDevice
impl UnwindSafe for NewNetworkDevice
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