pub struct SourceKind(/* private fields */);Expand description
A kind of place a value can come from.
Deliberately open: usage knows about the command line, the environment, files and declared
defaults, and every CLI in the fleet has at least one kind it reads itself — a git config,
a pkl file, an .npmrc. Those declare a source in the spec and pass their own kind here.
Implementations§
Source§impl SourceKind
impl SourceKind
Sourcepub const COERCED: Self
pub const COERCED: Self
A value the CLI rewrote after merging — mise’s raw implying jobs = 1.
Its own kind so explain never claims a file said something it did not. A rewrite
that looked like it came from wherever the original value did is how a user ends up
editing a file that has nothing to do with the value they are seeing.
pub const fn new(name: &'static str) -> Self
pub const fn name(self) -> &'static str
Trait Implementations§
Source§impl Clone for SourceKind
impl Clone for SourceKind
Source§fn clone(&self) -> SourceKind
fn clone(&self) -> SourceKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SourceKind
Source§impl Debug for SourceKind
impl Debug for SourceKind
impl Eq for SourceKind
Source§impl PartialEq for SourceKind
impl PartialEq for SourceKind
impl StructuralPartialEq for SourceKind
Auto Trait Implementations§
impl Freeze for SourceKind
impl RefUnwindSafe for SourceKind
impl Send for SourceKind
impl Sync for SourceKind
impl Unpin for SourceKind
impl UnsafeUnpin for SourceKind
impl UnwindSafe for SourceKind
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