[][src]Struct diesel::pg::types::sql_types::MacAddr

pub struct MacAddr;

The MACADDR SQL type. This type can only be used with feature = "network-address"

ToSql impls

FromSql impls

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 FromSql<MacAddr, Pg> for [u8; 6][src]

impl<'expr> AsExpression<MacAddr> for &'expr [u8; 6][src]

type Expression = Bound<MacAddr, Self>

The expression being returned

impl<'expr2, 'expr> AsExpression<MacAddr> for &'expr2 &'expr [u8; 6][src]

type Expression = Bound<MacAddr, Self>

The expression being returned

impl AsExpression<MacAddr> for [u8; 6][src]

type Expression = Bound<MacAddr, Self>

The expression being returned

impl QueryId for MacAddr[src]

type QueryId = MacAddr

A type which uniquely represents Self in a SQL query. Read more

impl ToSql<MacAddr, Pg> for [u8; 6][src]

impl HasSqlType<MacAddr> for Pg[src]

impl NotNull for MacAddr[src]

impl SingleValue for MacAddr[src]

impl Default for MacAddr[src]

impl Clone for MacAddr[src]

impl Copy for MacAddr[src]

impl Debug for MacAddr[src]

Auto Trait Implementations

impl Send for MacAddr

impl Unpin for MacAddr

impl Sync for MacAddr

impl UnwindSafe for MacAddr

impl RefUnwindSafe for MacAddr

Blanket Implementations

impl<T> IntoSql for T[src]

impl<T> IntoNullable for T where
    T: NotNull
[src]

type Nullable = Nullable<T>

The nullable representation of this type. Read more

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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