pub struct TitledMultiSelectEnumSchema {
pub type_: ArrayTypeConst,
pub items: TitledEnumItems,
pub min_items: Option<u32>,
pub max_items: Option<u32>,
pub title: Option<Cow<'static, str>>,
pub description: Option<Cow<'static, str>>,
pub default: Option<Vec<String>>,
}Expand description
Schema for multi-selection enum with display titles for each option
Fields§
§type_: ArrayTypeConst§items: TitledEnumItems§min_items: Option<u32>§max_items: Option<u32>§title: Option<Cow<'static, str>>§description: Option<Cow<'static, str>>§default: Option<Vec<String>>Implementations§
Source§impl TitledMultiSelectEnumSchema
impl TitledMultiSelectEnumSchema
pub fn new(options: impl Into<Vec<EnumOption>>) -> Self
Sourcepub fn from_pairs<I, V, T>(pairs: I) -> Self
pub fn from_pairs<I, V, T>(pairs: I) -> Self
Create from tuples of (value, title)
pub fn title(self, title: impl Into<Cow<'static, str>>) -> Self
pub fn description(self, description: impl Into<Cow<'static, str>>) -> Self
pub fn with_default(self, default: impl Into<Vec<String>>) -> Self
pub fn min_items(self, min: u32) -> Self
pub fn max_items(self, max: u32) -> Self
pub fn items_range(self, min: u32, max: u32) -> Self
Trait Implementations§
Source§impl Clone for TitledMultiSelectEnumSchema
impl Clone for TitledMultiSelectEnumSchema
Source§fn clone(&self) -> TitledMultiSelectEnumSchema
fn clone(&self) -> TitledMultiSelectEnumSchema
Returns a duplicate 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 TitledMultiSelectEnumSchema
impl Debug for TitledMultiSelectEnumSchema
Source§impl<'de> Deserialize<'de> for TitledMultiSelectEnumSchema
impl<'de> Deserialize<'de> for TitledMultiSelectEnumSchema
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
impl StructuralPartialEq for TitledMultiSelectEnumSchema
Auto Trait Implementations§
impl Freeze for TitledMultiSelectEnumSchema
impl RefUnwindSafe for TitledMultiSelectEnumSchema
impl Send for TitledMultiSelectEnumSchema
impl Sync for TitledMultiSelectEnumSchema
impl Unpin for TitledMultiSelectEnumSchema
impl UnwindSafe for TitledMultiSelectEnumSchema
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