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> !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> 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> Same for T

§

type Output = T

Should always be Self
source§

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

§

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>,

§

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.