pub struct InputRequest<'a> {
pub path: &'a str,
pub query: Option<&'a str>,
pub fields: &'a FormFields,
pub identity: Option<&'a str>,
pub peer: IpAddr,
}Expand description
What a handler is told about a submission.
Fields§
§path: &'a strThe form’s action path, with any query removed.
query: Option<&'a str>The query the action carried, if any — how a form says which thing it
acts on, as in [form action="/index?reply=12"].
fields: &'a FormFieldsThe submitted fields.
identity: Option<&'a str>Who submitted, resolved from their session token, or None for
anonymous. Never the token itself — see crate::session.
peer: IpAddrWhere the submission came from.
Given here and not to the include resolver, because this is what abuse control needs and rendering does not: a login endpoint that cannot count attempts per source cannot be defended against guessing, and a global counter would let one attacker lock out everybody.
Trait Implementations§
Source§impl<'a> Clone for InputRequest<'a>
impl<'a> Clone for InputRequest<'a>
impl<'a> Copy for InputRequest<'a>
Auto Trait Implementations§
impl<'a> Freeze for InputRequest<'a>
impl<'a> RefUnwindSafe for InputRequest<'a>
impl<'a> Send for InputRequest<'a>
impl<'a> Sync for InputRequest<'a>
impl<'a> Unpin for InputRequest<'a>
impl<'a> UnsafeUnpin for InputRequest<'a>
impl<'a> UnwindSafe for InputRequest<'a>
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