#[non_exhaustive]pub enum RefKind {
None,
Ref,
Rev,
Both,
}Expand description
Discriminates the four ref/rev presence states without forcing callers
to read both FlakeRef::ref_ and FlakeRef::rev and reason about
the cross product.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
None
Neither ref_ nor rev is set.
Ref
Only ref_ is set (a branch or tag name, not a 40-hex commit hash).
Rev
Only rev is set (pinned to a 40-hex commit hash).
Both
Both ref_ and rev are set (canonical Nix’s three-segment Indirect
form, flake:id/ref/rev).
Trait Implementations§
impl Copy for RefKind
impl Eq for RefKind
impl StructuralPartialEq for RefKind
Auto Trait Implementations§
impl Freeze for RefKind
impl RefUnwindSafe for RefKind
impl Send for RefKind
impl Sync for RefKind
impl Unpin for RefKind
impl UnsafeUnpin for RefKind
impl UnwindSafe for RefKind
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