pub struct VersionTuple {
pub major: u16,
pub minor: u16,
}Fields§
§major: u16Breaking change; different major versions are not at all compatible with each other.
minor: u16Non-breaking change; a host can run a module that requests an older minor version than the host implements, but not the other way around
Implementations§
Source§impl VersionTuple
impl VersionTuple
pub const fn new(major: u16, minor: u16) -> Self
pub const fn eq(self, other: Self) -> bool
Sourcepub const fn supports(self, module_version: VersionTuple) -> bool
pub const fn supports(self, module_version: VersionTuple) -> bool
Checks if a host implementing this version can run a module that expects module_version
pub const fn from_u32(v: u32) -> Self
pub const fn to_u32(self) -> u32
Trait Implementations§
Source§impl Clone for VersionTuple
impl Clone for VersionTuple
Source§fn clone(&self) -> VersionTuple
fn clone(&self) -> VersionTuple
Returns a duplicate 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 moreSource§impl Debug for VersionTuple
impl Debug for VersionTuple
Source§impl Display for VersionTuple
impl Display for VersionTuple
Source§impl Ord for VersionTuple
impl Ord for VersionTuple
Source§fn cmp(&self, other: &VersionTuple) -> Ordering
fn cmp(&self, other: &VersionTuple) -> Ordering
1.21.0 · 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
Source§impl PartialEq for VersionTuple
impl PartialEq for VersionTuple
Source§impl PartialOrd for VersionTuple
impl PartialOrd for VersionTuple
impl Copy for VersionTuple
impl Eq for VersionTuple
impl StructuralPartialEq for VersionTuple
Auto Trait Implementations§
impl Freeze for VersionTuple
impl RefUnwindSafe for VersionTuple
impl Send for VersionTuple
impl Sync for VersionTuple
impl Unpin for VersionTuple
impl UnwindSafe for VersionTuple
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more