pub struct ConstrainedAddr(/* private fields */);Expand description
Address wrapper for constrained protocol connections
This wraps TransportAddr to provide constrained-specific functionality
while maintaining compatibility with the transport system.
Implementations§
Source§impl ConstrainedAddr
impl ConstrainedAddr
Sourcepub fn new(addr: TransportAddr) -> Self
pub fn new(addr: TransportAddr) -> Self
Create a new constrained address from a transport address
Sourcepub fn transport_addr(&self) -> &TransportAddr
pub fn transport_addr(&self) -> &TransportAddr
Get the underlying transport address
Sourcepub fn into_transport_addr(self) -> TransportAddr
pub fn into_transport_addr(self) -> TransportAddr
Consume self and return the underlying transport address
Sourcepub fn is_constrained_transport(&self) -> bool
pub fn is_constrained_transport(&self) -> bool
Check if this address supports the constrained protocol
Constrained protocol is used for bandwidth-limited transports like BLE and LoRa.
Trait Implementations§
Source§impl Clone for ConstrainedAddr
impl Clone for ConstrainedAddr
Source§fn clone(&self) -> ConstrainedAddr
fn clone(&self) -> ConstrainedAddr
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ConstrainedAddr
impl Debug for ConstrainedAddr
Source§impl Display for ConstrainedAddr
impl Display for ConstrainedAddr
impl Eq for ConstrainedAddr
Source§impl From<ConstrainedAddr> for TransportAddr
impl From<ConstrainedAddr> for TransportAddr
Source§fn from(addr: ConstrainedAddr) -> Self
fn from(addr: ConstrainedAddr) -> Self
Converts to this type from the input type.
Source§impl From<SocketAddr> for ConstrainedAddr
impl From<SocketAddr> for ConstrainedAddr
Source§fn from(addr: SocketAddr) -> Self
fn from(addr: SocketAddr) -> Self
Converts to this type from the input type.
Source§impl From<TransportAddr> for ConstrainedAddr
impl From<TransportAddr> for ConstrainedAddr
Source§fn from(addr: TransportAddr) -> Self
fn from(addr: TransportAddr) -> Self
Converts to this type from the input type.
Source§impl Hash for ConstrainedAddr
impl Hash for ConstrainedAddr
Source§impl PartialEq for ConstrainedAddr
impl PartialEq for ConstrainedAddr
impl StructuralPartialEq for ConstrainedAddr
Auto Trait Implementations§
impl Freeze for ConstrainedAddr
impl RefUnwindSafe for ConstrainedAddr
impl Send for ConstrainedAddr
impl Sync for ConstrainedAddr
impl Unpin for ConstrainedAddr
impl UnsafeUnpin for ConstrainedAddr
impl UnwindSafe for ConstrainedAddr
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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§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.