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

source

pub fn new(bytes: [u8; 6]) -> MacAddress

Creates a new MacAddress struct from the given bytes.

sourceยง

impl MacAddress

source

pub fn bytes(self) -> [u8; 6]

Returns the array of MAC address bytes.

Trait Implementationsยง

sourceยง

impl Clone for MacAddress

sourceยง

fn clone(&self) -> MacAddress

Returns a copy of the value. Read more
1.0.0 ยท sourceยง

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
sourceยง

impl Debug for MacAddress

sourceยง

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
sourceยง

impl Decode<'_, Postgres> for MacAddress

sourceยง

fn decode( value: PgValueRef<'_> ) -> Result<MacAddress, Box<dyn Error + Send + Sync>>

Decode a new value of this type using a raw value from the database.
sourceยง

impl Default for MacAddress

sourceยง

fn default() -> MacAddress

Returns the โ€œdefault valueโ€ for a type. Read more
sourceยง

impl Display for MacAddress

sourceยง

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
sourceยง

impl Encode<'_, Postgres> for MacAddress

sourceยง

fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull

Writes the value of self into buf without moving self. Read more
sourceยง

fn size_hint(&self) -> usize

sourceยง

fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
where Self: Sized,

Writes the value of self into buf in the expected format for the database.
sourceยง

fn produces(&self) -> Option<<DB as Database>::TypeInfo>

sourceยง

impl From<[u8; 6]> for MacAddress

sourceยง

fn from(v: [u8; 6]) -> MacAddress

Converts to this type from the input type.
sourceยง

impl FromStr for MacAddress

ยง

type Err = MacParseError

The associated error which can be returned from parsing.
sourceยง

fn from_str(input: &str) -> Result<MacAddress, <MacAddress as FromStr>::Err>

Parses a string s to return a value of this type. Read more
sourceยง

impl Hash for MacAddress

sourceยง

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 ยท sourceยง

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
sourceยง

impl Ord for MacAddress

sourceยง

fn cmp(&self, other: &MacAddress) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 ยท sourceยง

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 ยท sourceยง

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 ยท sourceยง

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
sourceยง

impl PartialEq for MacAddress

sourceยง

fn eq(&self, other: &MacAddress) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 ยท sourceยง

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
sourceยง

impl PartialOrd for MacAddress

sourceยง

fn partial_cmp(&self, other: &MacAddress) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 ยท sourceยง

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 ยท sourceยง

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 ยท sourceยง

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 ยท sourceยง

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
sourceยง

impl PgHasArrayType for MacAddress

sourceยง

impl TryFrom<&str> for MacAddress

ยง

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>

Performs the conversion.
sourceยง

impl TryFrom<Cow<'_, str>> for MacAddress

ยง

type Error = MacParseError

The type returned in the event of a conversion error.
sourceยง

fn try_from( value: Cow<'_, str> ) -> Result<MacAddress, <MacAddress as TryFrom<Cow<'_, str>>>::Error>

Performs the conversion.
sourceยง

impl Type<Postgres> for MacAddress

sourceยง

fn type_info() -> PgTypeInfo

Returns the canonical SQL type for this Rust type. Read more
sourceยง

fn compatible(ty: &PgTypeInfo) -> bool

Determines if this Rust type is compatible with the given SQL type. Read more
sourceยง

impl Copy for MacAddress

sourceยง

impl Eq for MacAddress

sourceยง

impl StructuralPartialEq for MacAddress

Auto Trait Implementationsยง

Blanket Implementationsยง

sourceยง

impl<T> Any for T
where T: 'static + ?Sized,

sourceยง

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
sourceยง

impl<T> Borrow<T> for T
where T: ?Sized,

sourceยง

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
sourceยง

impl<T> BorrowMut<T> for T
where T: ?Sized,

sourceยง

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
sourceยง

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

sourceยง

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
sourceยง

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

sourceยง

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
sourceยง

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

sourceยง

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
sourceยง

impl<T> From<T> for T

sourceยง

fn from(t: T) -> T

Returns the argument unchanged.

sourceยง

impl<T> Instrument for T

sourceยง

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
sourceยง

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
sourceยง

impl<T, U> Into<U> for T
where U: From<T>,

sourceยง

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

sourceยง

impl<T> Same for T

ยง

type Output = T

Should always be Self
sourceยง

impl<T> ToOwned for T
where T: Clone,

ยง

type Owned = T

The resulting type after obtaining ownership.
sourceยง

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
sourceยง

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
sourceยง

impl<T> ToString for T
where T: Display + ?Sized,

sourceยง

default fn to_string(&self) -> String

Converts the given value to a String. Read more
sourceยง

impl<T, U> TryFrom<U> for T
where U: Into<T>,

ยง

type Error = Infallible

The type returned in the event of a conversion error.
sourceยง

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
sourceยง

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

ยง

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
sourceยง

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
sourceยง

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

sourceยง

fn vzip(self) -> V

sourceยง

impl<T> WithSubscriber for T

sourceยง

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
sourceยง

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more