#[non_exhaustive]pub struct LabelField {
pub name: String,
pub label: String,
pub multiple: bool,
pub placeholder: String,
pub required: bool,
}Expand description
Defines a field that allows labels to be selected.
For JSON/YAML encoding, the value will be represented as a string or an
array of strings, depending on the value of the multiple field. In the
case of “application/x-www-form-urlencoded”, the value is always a single
string and multiple labels will be space-separated.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringName of the field as it will be included in the encoded query or config object.
label: StringSuggested label to display along the field (not to be confused with labels to be selected).
multiple: boolWhether multiple labels may be selected.
placeholder: StringSuggested placeholder to display when there is no value.
required: boolWhether a value is required.
Implementations§
Source§impl LabelField
impl LabelField
Trait Implementations§
Source§impl Clone for LabelField
impl Clone for LabelField
Source§fn clone(&self) -> LabelField
fn clone(&self) -> LabelField
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 LabelField
impl Debug for LabelField
Source§impl Default for LabelField
impl Default for LabelField
Source§fn default() -> LabelField
fn default() -> LabelField
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for LabelField
impl<'de> Deserialize<'de> for LabelField
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<LabelField> for QueryField
impl From<LabelField> for QueryField
Source§fn from(field: LabelField) -> Self
fn from(field: LabelField) -> Self
Converts to this type from the input type.
Source§impl PartialEq for LabelField
impl PartialEq for LabelField
Source§impl Serialize for LabelField
impl Serialize for LabelField
impl StructuralPartialEq for LabelField
Auto Trait Implementations§
impl Freeze for LabelField
impl RefUnwindSafe for LabelField
impl Send for LabelField
impl Sync for LabelField
impl Unpin for LabelField
impl UnsafeUnpin for LabelField
impl UnwindSafe for LabelField
Blanket Implementations§
impl<T> BindgenSerializable for T
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