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: u16
The major version number
minor: u16
The minor version number
Implementations
sourceimpl 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 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 fn to_be_bytes(self) -> [u8; 4]
pub fn to_be_bytes(self) -> [u8; 4]
The representation of this version as a big-endian byte array.
Trait Implementations
sourceimpl Clone for MajorMinor
impl Clone for MajorMinor
sourcefn clone(&self) -> MajorMinor
fn clone(&self) -> MajorMinor
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Compatible for MajorMinor
impl Compatible for MajorMinor
sourcefn compatible(&self, other: Self) -> bool
fn compatible(&self, other: Self) -> bool
sourceimpl Debug for MajorMinor
impl Debug for MajorMinor
sourceimpl Display for MajorMinor
impl Display for MajorMinor
sourceimpl PartialEq<MajorMinor> for MajorMinor
impl PartialEq<MajorMinor> for MajorMinor
sourcefn eq(&self, other: &MajorMinor) -> bool
fn eq(&self, other: &MajorMinor) -> bool
sourceimpl Scalar for MajorMinor
impl Scalar for MajorMinor
impl Copy for MajorMinor
impl Eq for MajorMinor
impl StructuralEq for MajorMinor
impl StructuralPartialEq for MajorMinor
Auto Trait Implementations
impl RefUnwindSafe for MajorMinor
impl Send for MajorMinor
impl Sync for MajorMinor
impl Unpin for MajorMinor
impl UnwindSafe for MajorMinor
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more