pub struct Request {
pub method: String,
pub path: String,
pub body: Vec<u8>,
pub request_id: [u8; 16],
pub trace_id: [u8; 16],
pub headers: Vec<Header>,
pub conn: ConnInfo,
}Expand description
Request represents an inbound NWEP request delivered to a Handler.
The request is constructed by the event loop from the C library’s nwep_request struct and
passed (together with a ResponseWriter) to Handler::serve.
Fields§
§method: StringNWEP method string (e.g. "read" or "write").
path: StringRequest path (e.g. "/hello").
body: Vec<u8>Request body bytes.
request_id: [u8; 16]16-byte opaque request identifier generated by the client.
trace_id: [u8; 16]16-byte opaque trace identifier for distributed tracing.
headers: Vec<Header>Custom headers sent by the client.
conn: ConnInfoIdentity and role of the peer that sent this request.
Implementations§
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnsafeUnpin for Request
impl UnwindSafe for Request
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