pub struct RevisionNo(pub u64);Expand description
Revision number for a file’s content.
Tuple Fields§
§0: u64Implementations§
Source§impl RevisionNo
impl RevisionNo
Sourcepub fn parse(value: u64) -> Result<Self, PublicOrdinalRangeError>
pub fn parse(value: u64) -> Result<Self, PublicOrdinalRangeError>
Validates a numeric value before using it as an ordinal.
Deserialization calls this method automatically. Code that
receives a raw integer through another interface must call it
explicitly. Direct tuple construction and From<u64> are for
values that have already been validated.
Sourcepub fn successor(self) -> Result<Self, PublicOrdinalRangeError>
pub fn successor(self) -> Result<Self, PublicOrdinalRangeError>
Returns the next ordinal, or an error at the public maximum.
Trait Implementations§
Source§impl Clone for RevisionNo
impl Clone for RevisionNo
impl Copy for RevisionNo
Source§impl Debug for RevisionNo
impl Debug for RevisionNo
Source§impl<'de> Deserialize<'de> for RevisionNo
impl<'de> Deserialize<'de> for RevisionNo
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for RevisionNo
impl Display for RevisionNo
impl Eq for RevisionNo
Source§impl From<u64> for RevisionNo
impl From<u64> for RevisionNo
Source§impl Hash for RevisionNo
impl Hash for RevisionNo
Source§impl Ord for RevisionNo
impl Ord for RevisionNo
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for RevisionNo
impl PartialEq for RevisionNo
Source§impl PartialOrd for RevisionNo
impl PartialOrd for RevisionNo
Source§impl Serialize for RevisionNo
impl Serialize for RevisionNo
impl StructuralPartialEq for RevisionNo
Auto Trait Implementations§
impl Freeze for RevisionNo
impl RefUnwindSafe for RevisionNo
impl Send for RevisionNo
impl Sync for RevisionNo
impl Unpin for RevisionNo
impl UnsafeUnpin for RevisionNo
impl UnwindSafe for RevisionNo
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