pub struct SandboxContextInput {
pub method: Option<String>,
pub path: Option<String>,
pub host: Option<String>,
pub scheme: Option<String>,
pub headers: HashMap<String, StringOrList>,
pub query_params: HashMap<String, StringOrList>,
pub body: Option<String>,
pub body_base64: Option<String>,
pub remote_addr: Option<String>,
pub protocol: Option<Protocol>,
pub message: HashMap<String, Value>,
pub response: Option<ResponseInput>,
}Expand description
A synthetic context. Every field is optional: posting {} yields a valid
GET / run.
deny_unknown_fields is deliberate here even though it is unusual — a
typo’d "paths" must fail loudly rather than silently default to / and
produce a baffling trace.
Fields§
§method: Option<String>§path: Option<String>§host: Option<String>§scheme: Option<String>§headers: HashMap<String, StringOrList>§query_params: HashMap<String, StringOrList>§body: Option<String>Plain UTF-8 body. Mutually exclusive with body_base64.
body_base64: Option<String>Base64 body, for binary payloads. Mutually exclusive with body.
remote_addr: Option<String>§protocol: Option<Protocol>§message: HashMap<String, Value>§response: Option<ResponseInput>Implementations§
Trait Implementations§
Source§impl Clone for SandboxContextInput
impl Clone for SandboxContextInput
Source§fn clone(&self) -> SandboxContextInput
fn clone(&self) -> SandboxContextInput
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SandboxContextInput
impl Debug for SandboxContextInput
Source§impl Default for SandboxContextInput
impl Default for SandboxContextInput
Source§fn default() -> SandboxContextInput
fn default() -> SandboxContextInput
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SandboxContextInputwhere
SandboxContextInput: Default,
impl<'de> Deserialize<'de> for SandboxContextInputwhere
SandboxContextInput: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SandboxContextInput
impl RefUnwindSafe for SandboxContextInput
impl Send for SandboxContextInput
impl Sync for SandboxContextInput
impl Unpin for SandboxContextInput
impl UnsafeUnpin for SandboxContextInput
impl UnwindSafe for SandboxContextInput
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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