Struct diesel::pg::types::sql_types::MacAddr [−][src]
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
fn as_expression(self) -> Self::Expression
[src]
impl<'expr2, 'expr> AsExpression<MacAddr> for &'expr2 &'expr [u8; 6]
[src]
type Expression = Bound<MacAddr, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
impl AsExpression<MacAddr> for [u8; 6]
[src]
type Expression = Bound<MacAddr, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
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]
fn metadata(_: &PgMetadataLookup) -> PgTypeMetadata
[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
const HAS_STATIC_QUERY_ID: bool
[src]
fn query_id() -> Option<TypeId>
[src]
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IntoNullable for T where
T: NotNull,
[src]
T: NotNull,
impl<T> IntoSql for T
[src]
fn into_sql<T>(self) -> AsExprOf<Self, T> where
Self: AsExpression<T> + Sized,
[src]
Self: AsExpression<T> + Sized,
fn as_sql<'a, T>(&'a self) -> AsExprOf<&'a Self, T> where
&'a Self: AsExpression<T>,
[src]
&'a Self: AsExpression<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,