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<ProtAddr, <ProtAddr as FromStr>::Err>
fn from_str(addr: &str) -> Result<ProtAddr, <ProtAddr as FromStr>::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 Freeze for ProtAddr
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