#[non_exhaustive]pub struct KwargSpec {
pub nargs: NArgs,
pub kwargs: IndexMap<String, KwargSpec>,
pub flags: IndexSet<String>,
pub sortable: bool,
pub no_autosort: bool,
}Expand description
Specification for a keyword section and any nested sub-keywords it accepts.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.nargs: NArgsNumber of positional arguments accepted after the keyword itself.
kwargs: IndexMap<String, KwargSpec>Nested keywords that may appear after this keyword.
flags: IndexSet<String>Flag tokens accepted within this keyword section.
sortable: boolWhen true, arguments in this keyword section may be sorted
lexicographically if enable_sort is enabled in the config.
no_autosort: boolWhen true, the autosort heuristic must never reorder
arguments in this section. Use for kwargs whose value list has
positional semantics that flat sorting would corrupt — e.g.
PROPERTY <name> <values…> in set_property or the
<name> <value> pair structure under PROPERTIES. The spec’s
sortable: true setting still wins over this — if a section is
explicitly marked sortable, that’s a deliberate opt-in.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for KwargSpec
impl<'de> Deserialize<'de> for KwargSpec
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>,
impl Eq for KwargSpec
impl StructuralPartialEq for KwargSpec
Auto Trait Implementations§
impl Freeze for KwargSpec
impl RefUnwindSafe for KwargSpec
impl Send for KwargSpec
impl Sync for KwargSpec
impl Unpin for KwargSpec
impl UnsafeUnpin for KwargSpec
impl UnwindSafe for KwargSpec
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
key and return true if they are equal.