pub struct Addr { /* private fields */ }Implementations§
Source§impl Addr
impl Addr
pub fn new_addr(host: impl ToString, port: u16) -> Addr
pub fn new_bits(host: u32, port: u16) -> Addr
pub fn host(&self) -> &str
pub fn port(&self) -> u16
pub fn set_port(&mut self, port: u16)
pub fn set_host(&mut self, host: impl ToString)
pub fn socket_addr(&self) -> Result<IntoIter<SocketAddr>, RlsError>
pub fn socket_addr_v4(&self) -> Result<SocketAddr, RlsError>
pub fn socket_addr_v6(&self) -> Result<SocketAddr, RlsError>
pub fn to_bits(&self) -> Result<u32, RlsError>
Trait Implementations§
Source§impl From<SocketAddr> for Addr
impl From<SocketAddr> for Addr
Source§fn from(value: SocketAddr) -> Addr
fn from(value: SocketAddr) -> Addr
Converts to this type from the input type.
impl StructuralPartialEq for Addr
Auto Trait Implementations§
impl Freeze for Addr
impl RefUnwindSafe for Addr
impl Send for Addr
impl Sync for Addr
impl Unpin for Addr
impl UnsafeUnpin 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