embedded_nal_coap

Struct CoAPRuntimeClient

Source
pub struct CoAPRuntimeClient<'a, const CONCURRENT_REQUESTS: usize> { /* private fields */ }
Expand description

Access to the client side of a CoAPShared

From this, requests can be be started through the [.to()] method.

This is the “runtime” variant because it can be copied around arbitrarily, and requests made through it take any available of the CONCURRENT_REQUESTS slots.

Note that requests sent through this only make progress while the socket part of it is [.run()] (and being awaited).

Implementations§

Source§

impl<'a, const CONCURRENT_REQUESTS: usize> CoAPRuntimeClient<'a, CONCURRENT_REQUESTS>

Source

pub fn to( &self, address: SocketAddr, ) -> RequestingCoAPClient<'_, CONCURRENT_REQUESTS>

Set up a request to a particular network peer

This starts off a builder that (as of now) is immediately usable as a coap_request::Stack; on the long run, this may gain extra builder steps (such as a .reliably() or .unreliably(), or .longrunning() to tap into a larger token space), or more diverse .to_...() methods for better control.

FIXME: Currently, requests set up this way are sent as CONs but without retransmission.

Trait Implementations§

Source§

impl<'a, const CONCURRENT_REQUESTS: usize> Clone for CoAPRuntimeClient<'a, CONCURRENT_REQUESTS>

Source§

fn clone(&self) -> CoAPRuntimeClient<'a, CONCURRENT_REQUESTS>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a, const CONCURRENT_REQUESTS: usize> Copy for CoAPRuntimeClient<'a, CONCURRENT_REQUESTS>

Auto Trait Implementations§

§

impl<'a, const CONCURRENT_REQUESTS: usize> Freeze for CoAPRuntimeClient<'a, CONCURRENT_REQUESTS>

§

impl<'a, const CONCURRENT_REQUESTS: usize> !RefUnwindSafe for CoAPRuntimeClient<'a, CONCURRENT_REQUESTS>

§

impl<'a, const CONCURRENT_REQUESTS: usize> !Send for CoAPRuntimeClient<'a, CONCURRENT_REQUESTS>

§

impl<'a, const CONCURRENT_REQUESTS: usize> !Sync for CoAPRuntimeClient<'a, CONCURRENT_REQUESTS>

§

impl<'a, const CONCURRENT_REQUESTS: usize> Unpin for CoAPRuntimeClient<'a, CONCURRENT_REQUESTS>

§

impl<'a, const CONCURRENT_REQUESTS: usize> !UnwindSafe for CoAPRuntimeClient<'a, CONCURRENT_REQUESTS>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.