Enum tvix_eval::builtins::versions::VersionPart
source · pub enum VersionPart<'a> {
Word(&'a BStr),
Number(&'a BStr),
}
Expand description
Version strings can be broken up into Parts. One Part represents either a string of digits or characters. ‘.’ and ‘_’ represent deviders between parts and are not included in any part.
Variants§
Trait Implementations§
source§impl<'a> Clone for VersionPart<'a>
impl<'a> Clone for VersionPart<'a>
source§fn clone(&self) -> VersionPart<'a>
fn clone(&self) -> VersionPart<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'a> Debug for VersionPart<'a>
impl<'a> Debug for VersionPart<'a>
source§impl Ord for VersionPart<'_>
impl Ord for VersionPart<'_>
source§impl<'a> PartialEq for VersionPart<'a>
impl<'a> PartialEq for VersionPart<'a>
source§fn eq(&self, other: &VersionPart<'a>) -> bool
fn eq(&self, other: &VersionPart<'a>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for VersionPart<'_>
impl PartialOrd for VersionPart<'_>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<'a> Eq for VersionPart<'a>
impl<'a> StructuralPartialEq for VersionPart<'a>
Auto Trait Implementations§
impl<'a> Freeze for VersionPart<'a>
impl<'a> RefUnwindSafe for VersionPart<'a>
impl<'a> Send for VersionPart<'a>
impl<'a> Sync for VersionPart<'a>
impl<'a> Unpin for VersionPart<'a>
impl<'a> UnwindSafe for VersionPart<'a>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more