pub struct TargetName { /* private fields */ }Expand description
A target name describes the TCP or Unix socket that a client will connect to.
Implementations§
Source§impl TargetName
impl TargetName
Sourcepub fn new_unix_path(path: impl AsRef<Path>) -> Result<Self, Error>
pub fn new_unix_path(path: impl AsRef<Path>) -> Result<Self, Error>
Create a new target for a Unix socket.
Sourcepub fn new_unix_domain(domain: impl AsRef<[u8]>) -> Result<Self, Error>
pub fn new_unix_domain(domain: impl AsRef<[u8]>) -> Result<Self, Error>
Create a new target for a Unix socket.
Sourcepub fn to_addrs_sync(&self) -> Result<Vec<ResolvedTarget>, Error>
pub fn to_addrs_sync(&self) -> Result<Vec<ResolvedTarget>, Error>
Resolves the target addresses for a given host.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TargetName
impl RefUnwindSafe for TargetName
impl Send for TargetName
impl Sync for TargetName
impl Unpin for TargetName
impl UnwindSafe for TargetName
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