Struct coap_request_implementations::WithPath
source · pub struct WithPath<S: Stack + ?Sized, Prev: Builder<S>, P: AsUriPath> { /* private fields */ }
Expand description
A request that sets a request Uri-Path.
This is based on a Code, and built in Code::with_path.
Implementations§
source§impl<S: Stack + ?Sized, Prev: Builder<S, Output = Result<(), ()>>, P: AsUriPath> WithPath<S, Prev, P>
impl<S: Stack + ?Sized, Prev: Builder<S, Output = Result<(), ()>>, P: AsUriPath> WithPath<S, Prev, P>
sourcepub fn with_request_callback<F>(self, f: F) -> WithRequestCallback<S, Self, F>
pub fn with_request_callback<F>(self, f: F) -> WithRequestCallback<S, Self, F>
Set the request payload in a user callback.
§Caveats
Note that while the user may do all sorts of writes to the request message, they better stick to writing to the payload (for other uses might lead to panics).
Also, it is not sure whether this can actualy be used in a way that satisfies all its constraints.
pub fn with_request_payload_slice( self, payload: &[u8] ) -> WithRequestPayloadSlice<'_, S, Self>
sourcepub fn processing_response_payload_through<O, F>(
self,
f: F
) -> ProcessingResponse<S, Self, O, F>
pub fn processing_response_payload_through<O, F>( self, f: F ) -> ProcessingResponse<S, Self, O, F>
Provide the response payload to a user callback.
Trait Implementations§
source§impl<S: Stack + ?Sized, Prev: Builder<S>, P: AsUriPath> Request<S> for WithPath<S, Prev, P>
impl<S: Stack + ?Sized, Prev: Builder<S>, P: AsUriPath> Request<S> for WithPath<S, Prev, P>
type Carry = <Prev as Request<S>>::Carry
type Output = <Prev as Request<S>>::Output
source§async fn build_request(
&mut self,
req: &mut S::RequestMessage<'_>
) -> Result<Self::Carry, S::RequestUnionError>
async fn build_request( &mut self, req: &mut S::RequestMessage<'_> ) -> Result<Self::Carry, S::RequestUnionError>
Build the request message Read more
source§async fn process_response(
&mut self,
res: &S::ResponseMessage<'_>,
carry: Prev::Carry
) -> Self::Output
async fn process_response( &mut self, res: &S::ResponseMessage<'_>, carry: Prev::Carry ) -> Self::Output
Process the response message Read more
Auto Trait Implementations§
impl<S: ?Sized, Prev, P> RefUnwindSafe for WithPath<S, Prev, P>
impl<S: ?Sized, Prev, P> Send for WithPath<S, Prev, P>
impl<S: ?Sized, Prev, P> Sync for WithPath<S, Prev, P>
impl<S: ?Sized, Prev, P> Unpin for WithPath<S, Prev, P>
impl<S: ?Sized, Prev, P> UnwindSafe for WithPath<S, Prev, P>
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
Mutably borrows from an owned value. Read more