pub struct ConflictOption {
pub long: &'static [&'static str],
pub short: Option<char>,
}Expand description
An agent option proven to control the same mechanism the adapter uses (spec §21).
Fields§
§long: &'static [&'static str]Every accepted spelling, each starting with --.
short: Option<char>Implementations§
Source§impl ConflictOption
impl ConflictOption
Sourcepub fn spelling(&self) -> &'static str
pub fn spelling(&self) -> &'static str
The canonical spelling: the first long form. Every ConflictOption in a static AdapterMetadata
has at least one — metadata_invariants walks them all and asserts each starts with --, which an
empty list could not satisfy meaningfully.
This is the only place a flag mechanism’s spelling comes from, so the option a plan passes, the sentence the report prints and the token the evidence pipeline reads are one string, not three.
Sourcepub fn matched_spelling(&self, arg: &OsStr) -> Option<String>
pub fn matched_spelling(&self, arg: &OsStr) -> Option<String>
The spelling of this option that arg selects, without any value glued to it: --conf for
--conf=secret, -c for -csecret. This is what an error may print, because the rest of the
argument is the user’s value and can be a secret. Works on encoded bytes, so non-UTF-8 arguments are
scanned too; every spelling is ASCII, which makes the byte comparison exact on every platform.
Trait Implementations§
Source§impl Clone for ConflictOption
impl Clone for ConflictOption
Source§fn clone(&self) -> ConflictOption
fn clone(&self) -> ConflictOption
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 ConflictOption
Source§impl Debug for ConflictOption
impl Debug for ConflictOption
impl Eq for ConflictOption
Source§impl PartialEq for ConflictOption
impl PartialEq for ConflictOption
impl StructuralPartialEq for ConflictOption
Auto Trait Implementations§
impl Freeze for ConflictOption
impl RefUnwindSafe for ConflictOption
impl Send for ConflictOption
impl Sync for ConflictOption
impl Unpin for ConflictOption
impl UnsafeUnpin for ConflictOption
impl UnwindSafe for ConflictOption
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<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
§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.