pub struct LocalAddr(pub Addr);
Expand description
Local server’s address.
Tuple Fields
0: Addr
Methods from Deref<Target = Addr>
sourcepub fn as_socket_addr(&self) -> Option<&SocketAddr>
pub fn as_socket_addr(&self) -> Option<&SocketAddr>
If the address is a internet socket address, returns it. Returns None otherwise.
sourcepub fn as_unix_socket_addr(&self) -> Option<&SocketAddr>
Available on Unix only.
pub fn as_unix_socket_addr(&self) -> Option<&SocketAddr>
If the address is a unix socket address, returns it. Returns None otherwise.
Trait Implementations
sourceimpl<'a> FromRequest<'a> for &'a LocalAddr
impl<'a> FromRequest<'a> for &'a LocalAddr
sourcefn from_request<'life0, 'async_trait>(
req: &'a Request,
_body: &'life0 mut RequestBody
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>where
'a: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn from_request<'life0, 'async_trait>(
req: &'a Request,
_body: &'life0 mut RequestBody
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>where
'a: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Extract from request head and body.
impl StructuralPartialEq for LocalAddr
Auto Trait Implementations
impl RefUnwindSafe for LocalAddr
impl Send for LocalAddr
impl Sync for LocalAddr
impl Unpin for LocalAddr
impl UnwindSafe for LocalAddr
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more