Struct sqlx::types::mac_address::MacAddress
source ยท pub struct MacAddress { /* private fields */ }
Expand description
Contains the individual bytes of the MAC address.
Implementationsยง
sourceยงimpl MacAddress
impl MacAddress
sourcepub fn new(bytes: [u8; 6]) -> MacAddress
pub fn new(bytes: [u8; 6]) -> MacAddress
Creates a new MacAddress
struct from the given bytes.
Trait Implementationsยง
sourceยงimpl Clone for MacAddress
impl Clone for MacAddress
sourceยงfn clone(&self) -> MacAddress
fn clone(&self) -> MacAddress
Returns a copy of the value. Read more
1.0.0 ยท sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceยงimpl Debug for MacAddress
impl Debug for MacAddress
sourceยงimpl Decode<'_, Postgres> for MacAddress
impl Decode<'_, Postgres> for MacAddress
sourceยงfn decode(
value: PgValueRef<'_>,
) -> Result<MacAddress, Box<dyn Error + Sync + Send>>
fn decode( value: PgValueRef<'_>, ) -> Result<MacAddress, Box<dyn Error + Sync + Send>>
Decode a new value of this type using a raw value from the database.
sourceยงimpl Default for MacAddress
impl Default for MacAddress
sourceยงfn default() -> MacAddress
fn default() -> MacAddress
Returns the โdefault valueโ for a type. Read more
sourceยงimpl Display for MacAddress
impl Display for MacAddress
sourceยงimpl Encode<'_, Postgres> for MacAddress
impl Encode<'_, Postgres> for MacAddress
sourceยงfn encode_by_ref(
&self,
buf: &mut PgArgumentBuffer,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
fn encode_by_ref( &self, buf: &mut PgArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
fn size_hint(&self) -> usize
sourceยงfn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
Self: Sized,
Writes the value of
self
into buf
in the expected format for the database.fn produces(&self) -> Option<<DB as Database>::TypeInfo>
sourceยงimpl FromStr for MacAddress
impl FromStr for MacAddress
sourceยงtype Err = MacParseError
type Err = MacParseError
The associated error which can be returned from parsing.
sourceยงfn from_str(input: &str) -> Result<MacAddress, <MacAddress as FromStr>::Err>
fn from_str(input: &str) -> Result<MacAddress, <MacAddress as FromStr>::Err>
Parses a string
s
to return a value of this type. Read moresourceยงimpl Hash for MacAddress
impl Hash for MacAddress
sourceยงimpl Ord for MacAddress
impl Ord for MacAddress
sourceยงfn cmp(&self, other: &MacAddress) -> Ordering
fn cmp(&self, other: &MacAddress) -> Ordering
1.21.0 ยท sourceยงfn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
sourceยงimpl PartialEq for MacAddress
impl PartialEq for MacAddress
sourceยงimpl PartialOrd for MacAddress
impl PartialOrd for MacAddress
sourceยงimpl PgHasArrayType for MacAddress
impl PgHasArrayType for MacAddress
fn array_type_info() -> PgTypeInfo
fn array_compatible(ty: &PgTypeInfo) -> bool
sourceยงimpl TryFrom<&str> for MacAddress
impl TryFrom<&str> for MacAddress
sourceยงtype Error = MacParseError
type Error = MacParseError
The type returned in the event of a conversion error.
sourceยงfn try_from(
value: &str,
) -> Result<MacAddress, <MacAddress as TryFrom<&str>>::Error>
fn try_from( value: &str, ) -> Result<MacAddress, <MacAddress as TryFrom<&str>>::Error>
Performs the conversion.
sourceยงimpl Type<Postgres> for MacAddress
impl Type<Postgres> for MacAddress
sourceยงfn type_info() -> PgTypeInfo
fn type_info() -> PgTypeInfo
Returns the canonical SQL type for this Rust type. Read more
sourceยงfn compatible(ty: &PgTypeInfo) -> bool
fn compatible(ty: &PgTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
impl Copy for MacAddress
impl Eq for MacAddress
impl StructuralPartialEq for MacAddress
Auto Trait Implementationsยง
impl Freeze for MacAddress
impl RefUnwindSafe for MacAddress
impl Send for MacAddress
impl Sync for MacAddress
impl Unpin for MacAddress
impl UnwindSafe for MacAddress
Blanket Implementationsยง
sourceยงimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
sourceยงfn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
sourceยงunsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
๐ฌThis is a nightly-only experimental API. (
clone_to_uninit
)sourceยงimpl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
sourceยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
sourceยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
sourceยงfn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.sourceยงimpl<T> Instrument for T
impl<T> Instrument for T
sourceยงfn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourceยงfn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceยงimpl<T> IntoEither for T
impl<T> IntoEither for T
sourceยงfn into_either(self, into_left: bool) -> Either<Self, Self> โ
fn into_either(self, into_left: bool) -> Either<Self, Self> โ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresourceยงfn into_either_with<F>(self, into_left: F) -> Either<Self, Self> โ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> โ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more