Enum taple_core::ListenAddr
source · pub enum ListenAddr {
Memory {
port: Option<u32>,
},
IP4 {
addr: Option<Ipv4Addr>,
port: Option<u32>,
},
IP6 {
addr: Option<Ipv6Addr>,
port: Option<u32>,
},
}
Expand description
Represents a valid listening address for TAPLE. Internally, they are constituted as a MultiAddr.
Variants§
Implementations§
source§impl ListenAddr
impl ListenAddr
sourcepub fn increment_port(&mut self, offset: u32)
pub fn increment_port(&mut self, offset: u32)
Allows to increment the port of the listening address by a specified value.
sourcepub fn to_string(&self) -> Result<String, ListenAddrErrors>
pub fn to_string(&self) -> Result<String, ListenAddrErrors>
Allows to obtain, as a string, the listening address in MultiAddr format.
Trait Implementations§
source§impl Clone for ListenAddr
impl Clone for ListenAddr
source§fn clone(&self) -> ListenAddr
fn clone(&self) -> ListenAddr
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 ListenAddr
impl Debug for ListenAddr
source§impl Default for ListenAddr
impl Default for ListenAddr
source§impl<'de> Deserialize<'de> for ListenAddr
impl<'de> Deserialize<'de> for ListenAddr
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl RefUnwindSafe for ListenAddr
impl Send for ListenAddr
impl Sync for ListenAddr
impl Unpin for ListenAddr
impl UnwindSafe for ListenAddr
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