pub struct RevisionRange { /* private fields */ }Expand description
A revision range such as A..B or A...B.
Implementations§
Source§impl RevisionRange
impl RevisionRange
Sourcepub fn new(
left: impl AsRef<str>,
right: impl AsRef<str>,
kind: RevisionRangeKind,
) -> Result<RevisionRange, RevisionParseError>
pub fn new( left: impl AsRef<str>, right: impl AsRef<str>, kind: RevisionRangeKind, ) -> Result<RevisionRange, RevisionParseError>
Creates a revision range.
§Errors
Returns RevisionParseError::EmptyRangeSide when either side is empty.
Sourcepub const fn left(&self) -> &GitRevision
pub const fn left(&self) -> &GitRevision
Returns the left side.
Sourcepub const fn right(&self) -> &GitRevision
pub const fn right(&self) -> &GitRevision
Returns the right side.
Sourcepub const fn kind(&self) -> RevisionRangeKind
pub const fn kind(&self) -> RevisionRangeKind
Returns the range kind.
Trait Implementations§
Source§impl Clone for RevisionRange
impl Clone for RevisionRange
Source§fn clone(&self) -> RevisionRange
fn clone(&self) -> RevisionRange
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 moreSource§impl Debug for RevisionRange
impl Debug for RevisionRange
Source§impl Display for RevisionRange
impl Display for RevisionRange
Source§impl Hash for RevisionRange
impl Hash for RevisionRange
Source§impl Ord for RevisionRange
impl Ord for RevisionRange
Source§fn cmp(&self, other: &RevisionRange) -> Ordering
fn cmp(&self, other: &RevisionRange) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for RevisionRange
impl PartialEq for RevisionRange
Source§fn eq(&self, other: &RevisionRange) -> bool
fn eq(&self, other: &RevisionRange) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for RevisionRange
impl PartialOrd for RevisionRange
impl Eq for RevisionRange
impl StructuralPartialEq for RevisionRange
Auto Trait Implementations§
impl Freeze for RevisionRange
impl RefUnwindSafe for RevisionRange
impl Send for RevisionRange
impl Sync for RevisionRange
impl Unpin for RevisionRange
impl UnsafeUnpin for RevisionRange
impl UnwindSafe for RevisionRange
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