pub struct ActionContext {
pub cookies: Cookies,
pub headers: HeaderMap,
pub extensions: Extensions,
}Expand description
Request data available to actions declared as fn(ctx: ActionContext, input: T).
Fields§
§headers: HeaderMap§extensions: ExtensionsImplementations§
Source§impl ActionContext
impl ActionContext
pub fn extension<T: Send + Sync + 'static>(&self) -> Option<&T>
Sourcepub fn client_ip(&self) -> Option<IpAddr>
pub fn client_ip(&self) -> Option<IpAddr>
The client’s IP address, read as Request::client_ip reads it
(X-Forwarded-For only with [server] trust_proxy). For per-client
limits on an action: sign-ups, contact forms, password attempts.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ActionContext
impl !UnwindSafe for ActionContext
impl Forget for ActionContext
impl Freeze for ActionContext
impl Move for ActionContext
impl Send for ActionContext
impl Sync for ActionContext
impl Unpin for ActionContext
impl UnsafeUnpin for ActionContext
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