Struct diesel::pg::types::sql_types::MacAddr [−][src]
pub struct MacAddr;
The MACADDR SQL type. This type can only be used with feature = "network-address"
ToSql impls
[u8; 6]
FromSql impls
[u8; 6]
Examples
table! { devices { id -> Integer, macaddr -> MacAddr, } } let inserted_macaddr = insert_into(devices) .values(macaddr.eq([0x08, 0x00, 0x2b, 0x01, 0x02, 0x03])) .returning(macaddr) .get_result(&connection); assert_eq!(Ok([0x08, 0x00, 0x2b, 0x01, 0x02, 0x03]), inserted_macaddr);
Trait Implementations
impl QueryId for MacAddr[src]
impl QueryId for MacAddrtype QueryId = MacAddr
A type which uniquely represents Self in a SQL query. Read more
const HAS_STATIC_QUERY_ID: bool
HAS_STATIC_QUERY_ID: bool = true
Can the SQL generated by Self be uniquely identified by its type? Read more
fn query_id() -> Option<TypeId>[src]
fn query_id() -> Option<TypeId>Returns the type id of Self::QueryId if Self::HAS_STATIC_QUERY_ID. Returns None otherwise. Read more
impl NotNull for MacAddr[src]
impl NotNull for MacAddrimpl SingleValue for MacAddr[src]
impl SingleValue for MacAddrimpl HasSqlType<MacAddr> for Pg[src]
impl HasSqlType<MacAddr> for Pgfn metadata(_: &PgMetadataLookup) -> PgTypeMetadata[src]
fn metadata(_: &PgMetadataLookup) -> PgTypeMetadataFetch the metadata for the given type Read more
impl Debug for MacAddr[src]
impl Debug for MacAddrfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Clone for MacAddr[src]
impl Clone for MacAddrfn clone(&self) -> MacAddr[src]
fn clone(&self) -> MacAddrReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl Copy for MacAddr[src]
impl Copy for MacAddrimpl Default for MacAddr[src]
impl Default for MacAddr