Struct font_types::MajorMinor
source · Expand description
A type representing a major, minor version pair.
This is not part of the spec, but versions in the spec are frequently
represented as a major_version, minor_version pair. This type encodes
those as a single type, which is useful for some of the generated code that
parses out a version.
Fields§
§major: u16The major version number
minor: u16The minor version number
Implementations§
source§impl MajorMinor
impl MajorMinor
sourcepub const VERSION_1_0: MajorMinor = _
pub const VERSION_1_0: MajorMinor = _
Version 1.0
sourcepub const VERSION_1_1: MajorMinor = _
pub const VERSION_1_1: MajorMinor = _
Version 1.1
sourcepub const VERSION_1_2: MajorMinor = _
pub const VERSION_1_2: MajorMinor = _
Version 1.2
sourcepub const VERSION_1_3: MajorMinor = _
pub const VERSION_1_3: MajorMinor = _
Version 1.3
sourcepub const VERSION_2_0: MajorMinor = _
pub const VERSION_2_0: MajorMinor = _
Version 2.0
sourcepub const fn new(major: u16, minor: u16) -> Self
pub const fn new(major: u16, minor: u16) -> Self
Create a new version with major and minor parts.
sourcepub const fn to_be_bytes(self) -> [u8; 4]
pub const fn to_be_bytes(self) -> [u8; 4]
The representation of this version as a big-endian byte array.
Trait Implementations§
source§impl Clone for MajorMinor
impl Clone for MajorMinor
source§fn clone(&self) -> MajorMinor
fn clone(&self) -> MajorMinor
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more