Skip to main content

Reply

Struct Reply 

Source
pub struct Reply<'c, 'a, K> { /* private fields */ }
Expand description

A response with its body read, keyed by the form’s field enum K for the queries over its form.

The queries are those of the free functions this crate exports, over the response’s HTML.

Implementations§

Source§

impl<'c, 'a, K: PartialEq> Reply<'c, 'a, K>

Source

pub fn status(&self) -> StatusCode

Source

pub fn location(&self) -> Option<&str>

The Location a redirect names.

Source

pub fn cookies(&self) -> &[(String, String)]

The (name, value) pairs the response’s Set-Cookie headers carry.

Source

pub fn notification(&self) -> Option<Notification>

The flash notification the response set for the next page.

Source

pub fn html(&self) -> &str

Source

pub async fn follow(&self) -> Reply<'c, 'a, K>
where K: Clone,

Follows the redirect, carrying the cookies the response set, as a browser does.

§Panics

When the response names no Location.

Source

pub fn picked(&self) -> Option<Picked>

See picked.

Source

pub fn rows(&self) -> Vec<Row>

See rows.

Source

pub fn row_keys(&self) -> Vec<String>

See row_keys.

Source

pub fn groups(&self) -> Vec<Group>

See groups.

Source

pub fn empty_table(&self) -> Option<EmptyTable>

Source

pub fn tabs(&self) -> Vec<Tab>

See tabs.

Source

pub fn wizard_steps(&self) -> Vec<WizardStep>

Source

pub fn sections(&self) -> Vec<Section>

See sections.

Source

pub fn stale(&self) -> bool

Whether the edit form refused the save as stale; see stale_form.

Source

pub fn declined(&self) -> Option<String>

The message a record fn declined the save with; see declined_message.

Source

pub fn dirty(&self) -> bool

Whether the form renders dirty, guarding what it holds against leaving the page; see dirty_form.

Source

pub fn field_error(&self, field: K) -> Option<ErrorKind>

Why field’s error slot renders, read under its first key; see field_error.

Source

pub fn field_error_message(&self, field: K) -> Option<String>

The message field’s error slot renders; see field_error_message.

Source

pub fn input_value(&self, field: K) -> Option<String>

The value field’s input renders, as an edit page fills it; see input_value.

Auto Trait Implementations§

§

impl<'c, 'a, K> !RefUnwindSafe for Reply<'c, 'a, K>

§

impl<'c, 'a, K> !UnwindSafe for Reply<'c, 'a, K>

§

impl<'c, 'a, K> Forget for Reply<'c, 'a, K>

§

impl<'c, 'a, K> Freeze for Reply<'c, 'a, K>
where Vec<FormField<K>>: Freeze,

§

impl<'c, 'a, K> Move for Reply<'c, 'a, K>

§

impl<'c, 'a, K> Send for Reply<'c, 'a, K>
where Vec<FormField<K>>: Send,

§

impl<'c, 'a, K> Sync for Reply<'c, 'a, K>
where Vec<FormField<K>>: Sync,

§

impl<'c, 'a, K> Unpin for Reply<'c, 'a, K>
where Vec<FormField<K>>: Unpin,

§

impl<'c, 'a, K> UnsafeUnpin for Reply<'c, 'a, K>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more