pub struct RequestPayload {
pub req_handle: u64,
pub req_body_handle: u64,
pub res_body_handle: u64,
pub method: String,
pub url: String,
pub headers: Vec<(String, String)>,
pub remote_node_id: String,
pub is_bidi: bool,
}Expand description
Options passed to the JS serve callback per incoming request.
Fields§
§req_handle: u64Handle to the crate::ffi::handles::ResponseHeadEntry slot the adapter
must call crate::ffi::dispatcher::respond with. Source: HandleStore.
0 is the slotmap null sentinel and must never appear here at runtime.
req_body_handle: u64Handle to a crate::ffi::handles::BodyReader for the inbound request
body (source — adapters read from this). 0 = no request body.
res_body_handle: u64Handle to a [crate::ffi::handles::BodyWriter] for the outbound response
body (sink — adapters write into this). 0 = response body already closed.
method: String§url: String§headers: Vec<(String, String)>§remote_node_id: String§is_bidi: boolTrait Implementations§
Auto Trait Implementations§
impl Freeze for RequestPayload
impl RefUnwindSafe for RequestPayload
impl Send for RequestPayload
impl Sync for RequestPayload
impl Unpin for RequestPayload
impl UnsafeUnpin for RequestPayload
impl UnwindSafe for RequestPayload
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more