pub struct QueryString(/* private fields */);Expand description
Used to bind a form input element to a form data element.
Implementations§
Source§impl QueryString
impl QueryString
Sourcepub fn form_context(&self) -> (QueryString, FormDataSerialized)
pub fn form_context(&self) -> (QueryString, FormDataSerialized)
Gets the QueryString and the serialized FormData for the current context.
Sourcepub fn form_value<T: FromStr>(
&self,
) -> (QueryString, Result<T, <T as FromStr>::Err>)
pub fn form_value<T: FromStr>( &self, ) -> (QueryString, Result<T, <T as FromStr>::Err>)
Gets the QueryString and the serialized value for the current context.
This is very similar to form_context, but it assumes that FormData only contains one value
which is deserializable into the type T.
pub fn add(self, part: QueryStringPart) -> Self
pub fn add_index(self, index: usize) -> Self
pub fn add_key<K: Into<String>>(self, key: K) -> Self
Trait Implementations§
Source§impl Clone for QueryString
impl Clone for QueryString
Source§fn clone(&self) -> QueryString
fn clone(&self) -> QueryString
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for QueryString
impl Debug for QueryString
Source§impl Default for QueryString
impl Default for QueryString
Source§fn default() -> QueryString
fn default() -> QueryString
Returns the “default value” for a type. Read more
Source§impl Display for QueryString
impl Display for QueryString
Source§impl From<&str> for QueryString
impl From<&str> for QueryString
Source§impl From<String> for QueryString
impl From<String> for QueryString
Source§impl Hash for QueryString
impl Hash for QueryString
Source§impl IntoAttribute for QueryString
impl IntoAttribute for QueryString
Source§fn into_attribute(self) -> Attribute
fn into_attribute(self) -> Attribute
Converts the object into an
Attribute.Source§fn into_attribute_boxed(self: Box<Self>) -> Attribute
fn into_attribute_boxed(self: Box<Self>) -> Attribute
Helper function for dealing with
Box<dyn IntoAttribute>.Source§impl PartialEq for QueryString
impl PartialEq for QueryString
impl Eq for QueryString
impl StructuralPartialEq for QueryString
Auto Trait Implementations§
impl Freeze for QueryString
impl RefUnwindSafe for QueryString
impl Send for QueryString
impl Sync for QueryString
impl Unpin for QueryString
impl UnwindSafe for QueryString
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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