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]

The expression being returned

[src]

Perform the conversion

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

The expression being returned

[src]

Perform the conversion

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

The expression being returned

[src]

Perform the conversion

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

[src]

See the trait documentation.

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

[src]

See the trait documentation.

impl QueryId for MacAddr
[src]

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

HAS_STATIC_QUERY_ID: bool = true

Can the SQL generated by Self be uniquely identified by its type? Read more

[src]

Returns the type id of Self::QueryId if Self::HAS_STATIC_QUERY_ID. Returns None otherwise. Read more

impl NotNull for MacAddr
[src]

impl SingleValue for MacAddr
[src]

impl HasSqlType<MacAddr> for Pg
[src]

[src]

Fetch the metadata for the given type Read more

[src]

Fetch the metadata for a tuple representing an entire row Read more

impl Debug for MacAddr
[src]

[src]

Formats the value using the given formatter. Read more

impl Clone for MacAddr
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for MacAddr
[src]

impl Default for MacAddr
[src]

[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations

impl Send for MacAddr

impl Sync for MacAddr