pub struct ExecutionContext {
pub protocol: ExecutionProtocol,
pub method: HttpMethod,
pub request_path: String,
pub route_path: String,
pub module_name: Option<String>,
pub controller_prefix: Option<String>,
pub serialization: SerializationOptions,
pub metadata: BTreeMap<String, Value>,
pub request: BootRequest,
pub websocket: Option<WebSocketExecutionContext>,
pub transport: Option<TransportExecutionContext>,
}Expand description
Context visible to guards, interceptors, pipes, and filters.
Fields§
§protocol: ExecutionProtocol§method: HttpMethod§request_path: String§route_path: String§module_name: Option<String>§controller_prefix: Option<String>§serialization: SerializationOptions§metadata: BTreeMap<String, Value>§request: BootRequest§websocket: Option<WebSocketExecutionContext>§transport: Option<TransportExecutionContext>Implementations§
Source§impl ExecutionContext
impl ExecutionContext
pub fn protocol(&self) -> ExecutionProtocol
pub fn websocket_context(&self) -> Option<&WebSocketExecutionContext>
pub fn transport_context(&self) -> Option<&TransportExecutionContext>
pub fn metadata_value(&self, key: &str) -> Option<&Value>
pub fn metadata_as<T>(&self, key: &str) -> Result<Option<T>>where
T: DeserializeOwned,
Trait Implementations§
Source§impl Clone for ExecutionContext
impl Clone for ExecutionContext
Source§fn clone(&self) -> ExecutionContext
fn clone(&self) -> ExecutionContext
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 moreAuto Trait Implementations§
impl Freeze for ExecutionContext
impl RefUnwindSafe for ExecutionContext
impl Send for ExecutionContext
impl Sync for ExecutionContext
impl Unpin for ExecutionContext
impl UnsafeUnpin for ExecutionContext
impl UnwindSafe for ExecutionContext
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