pub enum Declares {
WholeFile,
KeyValue(&'static str),
JsonMember(&'static str, &'static str),
Directive(&'static str),
Nothing,
}Expand description
How a declared version is read out of the file that declares it. Small on purpose: three shapes cover every manifest here, and a fourth is a new variant rather than a parser.
Variants§
WholeFile
The whole file is the version, comments and blank lines skipped (.nvmrc).
KeyValue(&'static str)
A key = "value" or key: value line at any indentation (rust-version).
JsonMember(&'static str, &'static str)
A member of a JSON object, one level deep (engines → node).
Directive(&'static str)
A go 1.22 style directive at the start of a line.
Nothing
The file marks the toolchain relevant but declares no version.
Trait Implementations§
impl Copy for Declares
impl Eq for Declares
impl StructuralPartialEq for Declares
Auto Trait Implementations§
impl Freeze for Declares
impl RefUnwindSafe for Declares
impl Send for Declares
impl Sync for Declares
impl Unpin for Declares
impl UnsafeUnpin for Declares
impl UnwindSafe for Declares
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
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> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.