pub enum ProtAddr {
Tcp(String),
Uds(PathBuf),
}
Expand description
Protocol selection enum.
Variants§
Tcp(String)
Connect over TCP/IP. The String
is a socket address in the form
<host>:<port>
.
Uds(PathBuf)
Connect over unix local domain sockets. The PathBuf
is a file system
socket path.
Implementations§
Trait Implementations§
source§impl FromStr for ProtAddr
impl FromStr for ProtAddr
source§fn from_str(addr: &str) -> Result<Self, Self::Err>
fn from_str(addr: &str) -> Result<Self, Self::Err>
Parse a &str
and turn it into a ProtAddr
.
On unixy platforms if the addr
contains one or more slashes (/
) it is
assumed the address is a unix local domain socket address. Otherwise
it is assumed the address is an IP socket address, in the form
<host>:<port>
.
Auto Trait Implementations§
impl RefUnwindSafe for ProtAddr
impl Send for ProtAddr
impl Sync for ProtAddr
impl Unpin for ProtAddr
impl UnwindSafe for ProtAddr
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