pub enum ArgValueType {
Flag,
String,
I64,
FiniteF64,
Enum,
Json,
Uuid,
KeyValue,
}Expand description
Closed portable value type used by CLI specs and resolved invocations.
Variants§
Flag
String
I64
FiniteF64
Enum
Json
Uuid
A canonical RFC 4122 UUID, kept as its string form.
Declarative on purpose: the registry serializes to cli-spec-v1, so a
value type has to be something another language can implement from the
spec alone. A host-supplied parser could not survive that trip; this
can. The value stays a String so the core takes no UUID dependency —
what it buys is that a malformed one is a usage error, rejected before
the command runs, instead of a domain failure the handler has to invent.
KeyValue
A KEY=VALUE pair, split at the first =; the key must not be empty.
The value may itself contain = and may be empty. Kept as its source
text and split when read, so the pair has one spelling everywhere a
value is serialized.
Trait Implementations§
Source§impl Clone for ArgValueType
impl Clone for ArgValueType
Source§impl Debug for ArgValueType
impl Debug for ArgValueType
Source§impl<'de> Deserialize<'de> for ArgValueType
impl<'de> Deserialize<'de> for ArgValueType
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 ArgValueType
Source§impl PartialEq for ArgValueType
impl PartialEq for ArgValueType
Source§impl Serialize for ArgValueType
impl Serialize for ArgValueType
impl StructuralPartialEq for ArgValueType
Auto Trait Implementations§
impl Forget for ArgValueType
impl Freeze for ArgValueType
impl Move for ArgValueType
impl RefUnwindSafe for ArgValueType
impl Send for ArgValueType
impl Sync for ArgValueType
impl Unpin for ArgValueType
impl UnsafeUnpin for ArgValueType
impl UnwindSafe for ArgValueType
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.