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<'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 Clone for MacAddr[src]

impl Copy for MacAddr[src]

impl Debug for MacAddr[src]

impl Default for MacAddr[src]

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

impl HasSqlType<MacAddr> for Pg[src]

impl NotNull for MacAddr[src]

impl QueryId for MacAddr[src]

type QueryId = MacAddr

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

impl SingleValue for MacAddr[src]

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

Auto Trait Implementations

impl RefUnwindSafe for MacAddr

impl Send for MacAddr

impl Sync for MacAddr

impl Unpin for MacAddr

impl UnwindSafe for MacAddr

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<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> IntoSql for T[src]

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

type Owned = T

The resulting type after obtaining ownership.

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.