pub enum OptionShape {
Scalar(SchemaType),
OptionalScalar(SchemaType),
RepeatableList(RepeatableListShape),
RepeatableMap(RepeatableMapShape),
}Variants§
Scalar(SchemaType)
Required value: --opt VALUE or --opt=VALUE.
OptionalScalar(SchemaType)
Bare presence collapses to default; with value parses normally.
RepeatableList(RepeatableListShape)
Repeatable scalar option (-e a -e b); the collected value is a list
of the element type.
RepeatableMap(RepeatableMapShape)
Repeatable key-value option (-c a=1 -c b=2); the collected value is a
SchemaType::Map, never a list<tuple>.
Trait Implementations§
Source§impl Clone for OptionShape
impl Clone for OptionShape
Source§impl Debug for OptionShape
impl Debug for OptionShape
Source§impl<'de> Deserialize<'de> for OptionShape
impl<'de> Deserialize<'de> for OptionShape
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 FromSchema for OptionShape
impl FromSchema for OptionShape
fn from_value(value: &SchemaValue) -> Result<Self, FromSchemaError>
Source§impl IntoSchema for OptionShape
impl IntoSchema for OptionShape
fn type_id() -> TypeId
fn register_in(builder: &mut SchemaBuilder) -> SchemaType
fn to_value(&self) -> SchemaValue
Source§impl PartialEq for OptionShape
impl PartialEq for OptionShape
Source§impl Serialize for OptionShape
impl Serialize for OptionShape
impl StructuralPartialEq for OptionShape
Auto Trait Implementations§
impl Freeze for OptionShape
impl RefUnwindSafe for OptionShape
impl Send for OptionShape
impl Sync for OptionShape
impl Unpin for OptionShape
impl UnsafeUnpin for OptionShape
impl UnwindSafe for OptionShape
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