[−][src]Struct async_coap::datagram::NullSocket
An instance of AsyncDatagramSocket
that implements a simple null interface, where
all packets that are sent are discarded.
Methods
impl NullSocket
[src]
pub fn new() -> NullSocket
[src]
Creates a new instance of NullSocket
.
Trait Implementations
impl AsyncDatagramSocket for NullSocket
[src]
impl DatagramSocketTypes for NullSocket
[src]
type SocketAddr = NullSocketAddr
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 NullSocket
[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 NullSocket
[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 NullSocket
[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 NullSocket
[src]
impl Debug for NullSocket
[src]
Auto Trait Implementations
impl Sync for NullSocket
impl Send for NullSocket
impl UnwindSafe for NullSocket
impl RefUnwindSafe for NullSocket
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>,