[][src]Struct async_coap::datagram::NullSocket

pub struct 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.

impl AsyncSendTo for NullSocket[src]

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]

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]

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]

Important traits for NextRecvFromFuture<'a, 'b, T>
fn next_recv_from<'a, 'b>(
    &'a self,
    buf: &'b mut [u8]
) -> NextRecvFromFuture<'a, 'b, Self>
[src]

Returns a future that uses poll_recv_from.

impl MulticastSocket for NullSocket[src]

type IpAddr = String

The "address" type for this socket. Read more

impl Unpin for NullSocket[src]

impl Debug for NullSocket[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,