pub struct DocVersion {
pub major: u32,
pub minor: u32,
}Expand description
A two-component ADR document version, e.g. 1.10.
Compared component-wise rather than lexically or as a decimal, because
both of those readings sort 1.10 below 1.9 — and this repository has
an ADR that reached 1.11 one row at a time.
Fields§
§major: u32The part before the dot.
minor: u32The part after it. 10 is a later revision than 9, not an earlier one.
Implementations§
Trait Implementations§
Source§impl Clone for DocVersion
impl Clone for DocVersion
Source§fn clone(&self) -> DocVersion
fn clone(&self) -> DocVersion
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 DocVersion
Source§impl Debug for DocVersion
impl Debug for DocVersion
Source§impl Display for DocVersion
impl Display for DocVersion
impl Eq for DocVersion
Source§impl Ord for DocVersion
impl Ord for DocVersion
Source§fn cmp(&self, other: &DocVersion) -> Ordering
fn cmp(&self, other: &DocVersion) -> 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 DocVersion
impl PartialEq for DocVersion
Source§impl PartialOrd for DocVersion
impl PartialOrd for DocVersion
impl StructuralPartialEq for DocVersion
Auto Trait Implementations§
impl Freeze for DocVersion
impl RefUnwindSafe for DocVersion
impl Send for DocVersion
impl Sync for DocVersion
impl Unpin for DocVersion
impl UnsafeUnpin for DocVersion
impl UnwindSafe for DocVersion
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§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<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.