pub enum ValueSource {
Show 13 variants
Free,
Enumerated,
Path,
RepositoryPath,
Capability,
Command,
Rule,
ObjectKind,
Branch,
Graph,
Moment,
Shell,
Secret,
}Expand description
Where a value for an argument comes from, when something in this repository knows the set.
This is the completion contract, and it is a property of the argument, not of a shell
script: the same source answers a shell’s TAB, a generated form’s select and a machine
surface’s enumeration of what it will accept. Inference from the declaration comes
first — a value-enum argument carries its own values, a PATH placeholder is a path —
and only what cannot be inferred is annotated beside the command.
Variants§
Free
Nothing here knows the set; the caller types a value.
Enumerated
The declaration carries the values; they are on the argument.
Path
A path in the filesystem.
RepositoryPath
A path inside the repository.
Capability
A capability id, from the registry.
Command
A command id, from this graph.
Rule
A rule id, from the effective rule set.
ObjectKind
An object kind, from the index.
Branch
A git branch in this repository.
Graph
A graph id, from the graph registry.
Moment
A moment id, from the why catalogue.
Shell
A shell name, from the shells the activation supports.
Secret
A secret. Never enumerated, never cached, never suggested.
Implementations§
Source§impl ValueSource
impl ValueSource
Sourcepub fn suggestible(self) -> bool
pub fn suggestible(self) -> bool
May a completion offer values for this source at all?
Trait Implementations§
Source§impl Clone for ValueSource
impl Clone for ValueSource
Source§fn clone(&self) -> ValueSource
fn clone(&self) -> ValueSource
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 ValueSource
Source§impl Debug for ValueSource
impl Debug for ValueSource
Source§impl<'de> Deserialize<'de> for ValueSource
impl<'de> Deserialize<'de> for ValueSource
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 ValueSource
Source§impl JsonSchema for ValueSource
impl JsonSchema for ValueSource
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl Ord for ValueSource
impl Ord for ValueSource
Source§fn cmp(&self, other: &ValueSource) -> Ordering
fn cmp(&self, other: &ValueSource) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ValueSource
impl PartialEq for ValueSource
Source§fn eq(&self, other: &ValueSource) -> bool
fn eq(&self, other: &ValueSource) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ValueSource
impl PartialOrd for ValueSource
Source§impl Serialize for ValueSource
impl Serialize for ValueSource
impl StructuralPartialEq for ValueSource
Auto Trait Implementations§
impl Freeze for ValueSource
impl RefUnwindSafe for ValueSource
impl Send for ValueSource
impl Sync for ValueSource
impl Unpin for ValueSource
impl UnsafeUnpin for ValueSource
impl UnwindSafe for ValueSource
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.