Struct miow::net::SocketAddrBuf [−][src]
A type to represent a buffer in which a socket address will be stored.
This type is used with the recv_from_overlapped
function on the
UdpSocketExt
trait to provide space for the overlapped I/O operation to
fill in the address upon completion.
Implementations
impl SocketAddrBuf
[src]
pub fn new() -> SocketAddrBuf
[src]
Creates a new blank socket address buffer.
This should be used before a call to recv_from_overlapped
overlapped
to create an instance to pass down.
pub fn to_socket_addr(&self) -> Option<SocketAddr>
[src]
Parses this buffer to return a standard socket address.
This function should be called after the buffer has been filled in with
a call to recv_from_overlapped
being completed. It will interpret the
address filled in and return the standard socket address type.
If an error is encountered then None
is returned.
Trait Implementations
impl Clone for SocketAddrBuf
[src]
fn clone(&self) -> SocketAddrBuf
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for SocketAddrBuf
[src]
Auto Trait Implementations
impl RefUnwindSafe for SocketAddrBuf
impl Send for SocketAddrBuf
impl Sync for SocketAddrBuf
impl Unpin for SocketAddrBuf
impl UnwindSafe for SocketAddrBuf
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,