[−][src]Struct async_coap::datagram::LoopbackSocket
An instance of AsyncDatagramSocket
that implements a simple loopback interface, where
all packets that are sent are looped back to the input.
Methods
impl LoopbackSocket
[src]
pub fn new() -> LoopbackSocket
[src]
Creates a new instance of LoopbackSocket
.
Trait Implementations
impl AsyncDatagramSocket for LoopbackSocket
[src]
impl DatagramSocketTypes for LoopbackSocket
[src]
type SocketAddr = LoopbackSocketAddr
The "SocketAddr
" type used by this "socket". Typically std::net::SocketAddr
.
type Error = Error
The error type for errors emitted from this socket. Typically std::io::Error
.
fn local_addr(&self) -> Result<Self::SocketAddr, Self::Error>
[src]
fn lookup_host(
host: &str,
_port: u16
) -> Result<IntoIter<Self::SocketAddr>, Self::Error> where
Self: Sized,
[src]
host: &str,
_port: u16
) -> Result<IntoIter<Self::SocketAddr>, Self::Error> where
Self: Sized,
impl AsyncSendTo for LoopbackSocket
[src]
fn poll_send_to<B>(
self: Pin<&Self>,
cx: &mut Context,
buf: &[u8],
addr: B
) -> Poll<Result<usize, Self::Error>> where
B: ToSocketAddrs<SocketAddr = Self::SocketAddr, Error = Self::Error>,
[src]
self: Pin<&Self>,
cx: &mut Context,
buf: &[u8],
addr: B
) -> Poll<Result<usize, Self::Error>> where
B: ToSocketAddrs<SocketAddr = Self::SocketAddr, Error = Self::Error>,
ⓘImportant traits for NextSendToFuture<'a, 'b, T>fn next_send_to<'a, 'b, B>(
&'a self,
buf: &'b [u8],
addr: B
) -> NextSendToFuture<'a, 'b, Self> where
B: ToSocketAddrs<SocketAddr = Self::SocketAddr, Error = Self::Error>,
[src]
&'a self,
buf: &'b [u8],
addr: B
) -> NextSendToFuture<'a, 'b, Self> where
B: ToSocketAddrs<SocketAddr = Self::SocketAddr, Error = Self::Error>,
Returns a future that uses AsyncSendTo::poll_send_to
.
fn send_to<B>(&self, buf: &[u8], addr: B) -> Result<usize, Self::Error> where
B: ToSocketAddrs<SocketAddr = Self::SocketAddr, Error = Self::Error>,
[src]
B: ToSocketAddrs<SocketAddr = Self::SocketAddr, Error = Self::Error>,
A synchronous version of AsyncSendTo::poll_send_to
. If this isn't overridden by the trait's implementation, the default version will call poll_send_to()
and panics if it returns Poll::Pending
. Read more
impl AsyncRecvFrom for LoopbackSocket
[src]
fn poll_recv_from(
self: Pin<&Self>,
cx: &mut Context,
buf: &mut [u8]
) -> Poll<Result<(usize, Self::SocketAddr, Option<Self::SocketAddr>), Self::Error>>
[src]
self: Pin<&Self>,
cx: &mut Context,
buf: &mut [u8]
) -> Poll<Result<(usize, Self::SocketAddr, Option<Self::SocketAddr>), Self::Error>>
ⓘImportant traits for NextRecvFromFuture<'a, 'b, T>fn next_recv_from<'a, 'b>(
&'a self,
buf: &'b mut [u8]
) -> NextRecvFromFuture<'a, 'b, Self>
[src]
&'a self,
buf: &'b mut [u8]
) -> NextRecvFromFuture<'a, 'b, Self>
Returns a future that uses poll_recv_from
.
impl MulticastSocket for LoopbackSocket
[src]
type IpAddr = String
The "address" type for this socket. Read more
fn join_multicast<A>(&self, _addr: A) -> Result<(), Self::Error> where
A: Into<Self::IpAddr>,
[src]
A: Into<Self::IpAddr>,
fn leave_multicast<A>(&self, _addr: A) -> Result<(), Self::Error> where
A: Into<Self::IpAddr>,
[src]
A: Into<Self::IpAddr>,
impl Unpin for LoopbackSocket
[src]
impl Debug for LoopbackSocket
[src]
Auto Trait Implementations
impl Sync for LoopbackSocket
impl Send for LoopbackSocket
impl !UnwindSafe for LoopbackSocket
impl !RefUnwindSafe for LoopbackSocket
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for 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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,