Struct rocfl::ocfl::VersionNum [−][src]
Expand description
Represents an OCFL object version.
Fields
number: u32
width: u32
Implementations
Creates a new VersionNum at version 1 with the specified zero-padding width
Returns the previous version, or an Error if the previous version is invalid (less than 1).
Returns the next version, or an Error if the next version is invalid. Version number only have limits if they are zero-padded.
Trait Implementations
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
Performs the conversion.
Performs the conversion.
Performs the conversion.
This function is used when parsing command line arguments. It attempts to interpret a string
as a version if it is formatted like any of these examples: v3
, v00009
, or 8
.
type Err = RocflError
type Err = RocflError
The associated error which can be returned from parsing.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for VersionNum
impl Send for VersionNum
impl Sync for VersionNum
impl Unpin for VersionNum
impl UnwindSafe for VersionNum
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more