pub struct Request<Endpoint> {
pub original: CoapRequest<Endpoint>,
pub unmatched_path: Vec<String>,
}Expand description
Wrapper type for CoAP requests carrying extra context from filtering. This API is not
considered stable and in particular the inclusion of the CoapRequest reference is
likely to be removed in future versions when matching/filtering is more robust.
Fields§
§original: CoapRequest<Endpoint>§unmatched_path: Vec<String>Implementations§
Source§impl<Endpoint> Request<Endpoint>
impl<Endpoint> Request<Endpoint>
Sourcepub fn new_response(&self) -> Response
pub fn new_response(&self) -> Response
Construct a new, but incomplete, Response instance that is appropriately paired
with the request. For example, the response token is set-up to match the request.
Note that after the response is returned no further associated with the request can be guaranteed and callers are free to override these values, thus potentially violating the CoAP protocol spec.
Trait Implementations§
Auto Trait Implementations§
impl<Endpoint> Freeze for Request<Endpoint>where
Endpoint: Freeze,
impl<Endpoint> RefUnwindSafe for Request<Endpoint>where
Endpoint: RefUnwindSafe,
impl<Endpoint> Send for Request<Endpoint>where
Endpoint: Send,
impl<Endpoint> Sync for Request<Endpoint>where
Endpoint: Sync,
impl<Endpoint> Unpin for Request<Endpoint>where
Endpoint: Unpin,
impl<Endpoint> UnwindSafe for Request<Endpoint>where
Endpoint: UnwindSafe,
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