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>
impl<'a, const CONCURRENT_REQUESTS: usize> CoAPRuntimeClient<'a, CONCURRENT_REQUESTS>
Sourcepub fn to(
&self,
address: SocketAddr,
) -> RequestingCoAPClient<'_, CONCURRENT_REQUESTS>
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>
impl<'a, const CONCURRENT_REQUESTS: usize> Clone for CoAPRuntimeClient<'a, CONCURRENT_REQUESTS>
Source§fn clone(&self) -> CoAPRuntimeClient<'a, CONCURRENT_REQUESTS>
fn clone(&self) -> CoAPRuntimeClient<'a, CONCURRENT_REQUESTS>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreimpl<'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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)