[][src]Struct async_coap::datagram::DatagramLocalEndpoint

pub struct DatagramLocalEndpoint<US: AsyncDatagramSocket> where
    Self: Send + Sync
{ /* fields omitted */ }

Generic, datagram-based CoAP local endpoint implementation.

Methods

impl<US: AsyncDatagramSocket> DatagramLocalEndpoint<US>[src]

pub fn new(socket: US) -> DatagramLocalEndpoint<US>[src]

Creates a new DatagramLocalEndpoint instance with the given AsyncDatagramSocket and the standard scheme (coap:) and default port (5683).

pub fn with_scheme_and_port(
    socket: US,
    scheme: &'static str,
    default_port: u16
) -> DatagramLocalEndpoint<US>
[src]

Creates a new DatagramLocalEndpoint instance with the given AsyncDatagramSocket, using the specified scheme and default port.

pub fn socket(&self) -> &US[src]

Borrows a reference to the underlying socket.

Trait Implementations

impl<US: AsyncDatagramSocket> LocalEndpoint for DatagramLocalEndpoint<US>[src]

type SocketAddr = US::SocketAddr

The SocketAddr type to use with this local endpoint. This is usually simply std::net::SocketAddr, but may be different in some cases (like for CoAP-SMS endpoints). Read more

type SocketError = US::Error

The error type associated with errors generated by socket and address-lookup operations. Typically, this is std::io::Error, but it may be different if Self::SocketAddr isn't std::net::SocketAddr. Read more

type DefaultTransParams = StandardCoapConstants

The trait representing the default transmission parameters to use.

type LookupStream = Iter<IntoIter<Self::SocketAddr>>

The concrete return type of the lookup() method.

type RespondableInboundContext = DatagramRespondableInboundContext<Self::SocketAddr>

Type used by closure that is passed into receive(), representing the context for inbound requests. Read more

type InboundContext = DatagramInboundContext<Self::SocketAddr>

Type used by closure that is passed into send(), representing the context for the response. Read more

type RemoteEndpoint = DatagramRemoteEndpoint<US>

The concrete type for a RemoteEndpoint associated with this local endpoint.

impl<US: Debug + AsyncDatagramSocket> Debug for DatagramLocalEndpoint<US> where
    Self: Send + Sync
[src]

Auto Trait Implementations

impl<US> Send for DatagramLocalEndpoint<US>

impl<US> Unpin for DatagramLocalEndpoint<US>

impl<US> Sync for DatagramLocalEndpoint<US>

impl<US> RefUnwindSafe for DatagramLocalEndpoint<US> where
    US: RefUnwindSafe

impl<US> UnwindSafe for DatagramLocalEndpoint<US> where
    US: RefUnwindSafe

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> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<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>,