Struct yearly_version::Version
source · #[repr(C, align(8))]pub struct Version {
pub year: u32,
pub major: u32,
pub minor: u32,
pub patch: u32,
}Expand description
The yearly version number, encoding with a 64bit unsigned integer
Fields§
§year: u32Yearly version number, from 0 to 999999, indicating breaking updates
major: u32Major version number, from 0 to 255, indicating breaking updates
minor: u32Minor version number, from 0 to 255, indicating compatibility updates
patch: u32Patch version number, from 0 to 65535, indicating compatibility updates
Implementations§
source§impl Version
impl Version
sourcepub fn parse_advance_version(
s: &str,
start: usize
) -> Result<(Version, &str, usize), VersionError>
pub fn parse_advance_version( s: &str, start: usize ) -> Result<(Version, &str, usize), VersionError>
Parse a version from a string
pub fn parse_advance_year( input: &str, offset: usize ) -> Result<(u32, &str, usize), VersionError>
pub fn parse_advance_major( input: &str, offset: usize ) -> Result<(u32, &str, usize), VersionError>
pub fn parse_advance_minor( input: &str, offset: usize ) -> Result<(u32, &str, usize), VersionError>
pub fn parse_advance_patch( input: &str, offset: usize ) -> Result<(u32, &str, usize), VersionError>
Trait Implementations§
source§impl<'de> Deserialize<'de> for Version
impl<'de> Deserialize<'de> for Version
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 JsonSchema for Version
impl JsonSchema for Version
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
source§fn json_schema(_: &mut SchemaGenerator) -> Schema
fn json_schema(_: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moresource§impl Ord for Version
impl Ord for Version
source§impl PartialEq for Version
impl PartialEq for Version
source§impl PartialOrd for Version
impl PartialOrd for Version
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 Copy for Version
impl Eq for Version
impl StructuralPartialEq for Version
Auto Trait Implementations§
impl Freeze for Version
impl RefUnwindSafe for Version
impl Send for Version
impl Sync for Version
impl Unpin for Version
impl UnwindSafe for Version
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