pub struct Request {
pub values: FormValues,
pub references: References,
/* private fields */
}Fields§
§values: FormValues§references: ReferencesImplementations§
Source§impl Request
impl Request
pub async fn read( form: &'static Form, action: FormAction, user_id: Uuid, pairs: Vec<(String, String)>, ) -> Result<Self, WebError>
Sourcepub async fn read_prefilled(
form: &'static Form,
action: FormAction,
user_id: Uuid,
pairs: Vec<(String, String)>,
prefill: impl FnOnce(&mut FormValues),
) -> Result<Self, WebError>
pub async fn read_prefilled( form: &'static Form, action: FormAction, user_id: Uuid, pairs: Vec<(String, String)>, prefill: impl FnOnce(&mut FormValues), ) -> Result<Self, WebError>
Request::read with prefill applied to the decoded values.
Sourcepub async fn settle<T>(
&self,
run: impl AsyncFnOnce(&FormValues) -> Result<T, Failure>,
) -> Result<T, Failure>
pub async fn settle<T>( &self, run: impl AsyncFnOnce(&FormValues) -> Result<T, Failure>, ) -> Result<T, Failure>
Runs run unless a select text was not picked, which is refused as
invalid instead; the result counts as this request’s outcome.
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnsafeUnpin for Request
impl UnwindSafe for Request
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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