#[non_exhaustive]pub enum ArgBinding {
Typed,
Verbatim,
}Expand description
How the kernel’s argv binder hands a tool its arguments.
The default split into ToolArgs::positional, ToolArgs::named and
ToolArgs::flags is set-shaped, which suits most tools but cannot serve a
subcommand tree: kj block list --limit 5 renders back as
--limit=5 -- block list, which clap rejects because --limit belongs to
list, not the root. Order and multiplicity are gone by then.
A third binding is plausible, so this enum is #[non_exhaustive] from the
day it ships: adding the attribute later is itself a breaking change. Match
with a wildcard arm that fails loudly, never a silent default.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Typed
Decompose into positional/named/flags. The default; every tool
that does not ask for something else gets this.
Verbatim
Hand the tool every word after its name, in source order, as
ToolArgs::words. See ToolSchema::with_verbatim_argv.
Implementations§
Trait Implementations§
Source§impl Clone for ArgBinding
impl Clone for ArgBinding
Source§fn clone(&self) -> ArgBinding
fn clone(&self) -> ArgBinding
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ArgBinding
Source§impl Debug for ArgBinding
impl Debug for ArgBinding
Source§impl Default for ArgBinding
impl Default for ArgBinding
Source§fn default() -> ArgBinding
fn default() -> ArgBinding
Source§impl<'de> Deserialize<'de> for ArgBinding
impl<'de> Deserialize<'de> for ArgBinding
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ArgBinding, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ArgBinding, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for ArgBinding
Source§impl PartialEq for ArgBinding
impl PartialEq for ArgBinding
Source§impl Serialize for ArgBinding
impl Serialize for ArgBinding
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,
impl StructuralPartialEq for ArgBinding
Auto Trait Implementations§
impl Freeze for ArgBinding
impl RefUnwindSafe for ArgBinding
impl Send for ArgBinding
impl Sync for ArgBinding
impl Unpin for ArgBinding
impl UnsafeUnpin for ArgBinding
impl UnwindSafe for ArgBinding
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.