Enum async_stream_connection::Addr
source · pub enum Addr {
Inet(SocketAddr),
Unix(PathBuf),
}
Expand description
Address of a Stream Endpoint
let addr: Addr = "127.0.0.1:1337".parse()?;
or (unix only):
let addr: Addr = "/tmp/uds_example".parse()?;
Variants§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Addr
Available on crate feature serde
only.
impl<'de> Deserialize<'de> for Addr
Available on crate feature
serde
only.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
source§impl From<SocketAddr> for Addr
impl From<SocketAddr> for Addr
source§fn from(s: SocketAddr) -> Addr
fn from(s: SocketAddr) -> Addr
Converts to this type from the input type.
source§impl From<SocketAddr> for Addr
impl From<SocketAddr> for Addr
source§fn from(s: SocketAddr) -> Addr
fn from(s: SocketAddr) -> Addr
Converts to this type from the input type.
source§impl From<SocketAddr> for Addr
impl From<SocketAddr> for Addr
source§fn from(s: SocketAddr) -> Addr
fn from(s: SocketAddr) -> Addr
Converts to this type from the input type.
source§impl PartialEq<Addr> for Addr
impl PartialEq<Addr> for Addr
impl Eq for Addr
impl StructuralEq for Addr
impl StructuralPartialEq for Addr
Auto Trait Implementations§
impl RefUnwindSafe for Addr
impl Send for Addr
impl Sync for Addr
impl Unpin for Addr
impl UnwindSafe for Addr
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