Struct spacetimedb_lib::VersionTuple
source · pub struct VersionTuple {
pub major: u16,
pub minor: u16,
}
Fields§
§major: u16
Breaking change; different major versions are not at all compatible with each other.
minor: u16
Non-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 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 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§fn eq(&self, other: &VersionTuple) -> bool
fn eq(&self, other: &VersionTuple) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for VersionTuple
impl PartialOrd for VersionTuple
source§fn partial_cmp(&self, other: &VersionTuple) -> Option<Ordering>
fn partial_cmp(&self, other: &VersionTuple) -> Option<Ordering>
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 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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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