#[non_exhaustive]pub enum FlagKind {
Bool,
Enum,
String,
}Expand description
What kind of value (if any) a FlagSpec carries.
Typed (not &'static str) so a typo can’t slip into the wire
format and the Enum-implies-values-present invariant is
expressible at the type layer (see #215 for the design pass). Serialises
as the lowercased variant name: "bool", "enum", "string".
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Bool
Boolean switch (no value).
Enum
Value-bounded flag — values carries the accepted set.
String
Any non-Bool, non-Enum flag. Today every such flag emits
"string"; richer typing (Path / Int etc.) is intentionally
out of scope until a real consumer needs it — #[non_exhaustive]
reserves space without commitment.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FlagKind
impl RefUnwindSafe for FlagKind
impl Send for FlagKind
impl Sync for FlagKind
impl Unpin for FlagKind
impl UnsafeUnpin for FlagKind
impl UnwindSafe for FlagKind
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