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§fn clone(&self) -> OptionShape
fn clone(&self) -> OptionShape
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 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<OptionShape, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<OptionShape, <__D as Deserializer<'de>>::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<OptionShape, 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
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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