Struct sqlx::types::mac_address::MacAddress [−]
pub struct MacAddress { /* fields omitted */ }
Expand description
Contains the individual bytes of the MAC address.
Implementations
impl MacAddress
impl MacAddress
pub fn new(bytes: [u8; 6]) -> MacAddress
pub fn new(bytes: [u8; 6]) -> MacAddress
Creates a new MacAddress
struct from the given bytes.
impl MacAddress
impl MacAddress
Trait Implementations
impl Clone for MacAddress
impl Clone for MacAddress
pub fn clone(&self) -> MacAddress
pub fn clone(&self) -> MacAddress
Returns a copy of the value. Read more
Performs copy-assignment from source
. Read more
impl Debug for MacAddress
impl Debug for MacAddress
pub fn decode(
value: PgValueRef<'_>
) -> Result<MacAddress, Box<dyn Error + Send + Sync + 'static, Global>>
pub fn decode(
value: PgValueRef<'_>
) -> Result<MacAddress, Box<dyn Error + Send + Sync + 'static, Global>>
Decode a new value of this type using a raw value from the database.
impl Default for MacAddress
impl Default for MacAddress
pub fn default() -> MacAddress
pub fn default() -> MacAddress
Returns the ādefault valueā for a type. Read more
impl Display for MacAddress
impl Display for MacAddress
Writes the value of self
into buf
without moving self
. Read more
Writes the value of self
into buf
in the expected format for the database.
impl From<[u8; 6]> for MacAddress
impl From<[u8; 6]> for MacAddress
pub fn from(v: [u8; 6]) -> MacAddress
pub fn from(v: [u8; 6]) -> MacAddress
Performs the conversion.
impl FromStr for MacAddress
impl FromStr for MacAddress
type Err = MacParseError
type Err = MacParseError
The associated error which can be returned from parsing.
pub fn from_str(input: &str) -> Result<MacAddress, <MacAddress as FromStr>::Err>
pub fn from_str(input: &str) -> Result<MacAddress, <MacAddress as FromStr>::Err>
Parses a string s
to return a value of this type. Read more
impl Hash for MacAddress
impl Hash for MacAddress
impl Ord for MacAddress
impl Ord for MacAddress
pub fn cmp(&self, other: &MacAddress) -> Ordering
pub fn cmp(&self, other: &MacAddress) -> Ordering
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
impl PartialEq<MacAddress> for MacAddress
impl PartialEq<MacAddress> for MacAddress
pub fn eq(&self, other: &MacAddress) -> bool
pub fn eq(&self, other: &MacAddress) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
pub fn ne(&self, other: &MacAddress) -> bool
pub fn ne(&self, other: &MacAddress) -> bool
This method tests for !=
.
impl PartialOrd<MacAddress> for MacAddress
impl PartialOrd<MacAddress> for MacAddress
pub fn partial_cmp(&self, other: &MacAddress) -> Option<Ordering>
pub fn partial_cmp(&self, other: &MacAddress) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
impl<'_> TryFrom<&'_ str> for MacAddress
impl<'_> TryFrom<&'_ str> for MacAddress
type Error = MacParseError
type Error = MacParseError
The type returned in the event of a conversion error.
pub fn try_from(
value: &str
) -> Result<MacAddress, <MacAddress as TryFrom<&'_ str>>::Error>
pub fn try_from(
value: &str
) -> Result<MacAddress, <MacAddress as TryFrom<&'_ str>>::Error>
Performs the conversion.
impl Copy for MacAddress
impl Eq for MacAddress
impl StructuralEq for MacAddress
impl StructuralPartialEq for MacAddress
Auto Trait Implementations
impl RefUnwindSafe for MacAddress
impl Send for MacAddress
impl Sync for MacAddress
impl Unpin for MacAddress
impl UnwindSafe for MacAddress
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.