pub struct InterfaceVersion { /* private fields */ }Expand description
Version of an interface.
This structs validates to follow the interface versioning rules:
- The major or minor version must an
i32 - The major or minor version must be positive
- The minor version must be grater than
0>if the major is=0
Implementations§
Source§impl InterfaceVersion
impl InterfaceVersion
Sourcepub fn try_new(
version_major: i32,
version_minor: i32,
) -> Result<Self, VersionError>
pub fn try_new( version_major: i32, version_minor: i32, ) -> Result<Self, VersionError>
Validate the provided interface version
Sourcepub fn version_major(&self) -> i32
pub fn version_major(&self) -> i32
Returns the major version of the interface
Sourcepub fn version_minor(&self) -> i32
pub fn version_minor(&self) -> i32
Returns the minor version of the interface
Trait Implementations§
Source§impl Clone for InterfaceVersion
impl Clone for InterfaceVersion
Source§fn clone(&self) -> InterfaceVersion
fn clone(&self) -> InterfaceVersion
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 InterfaceVersion
impl Debug for InterfaceVersion
Source§impl Default for InterfaceVersion
impl Default for InterfaceVersion
Source§impl Display for InterfaceVersion
impl Display for InterfaceVersion
Source§impl From<&InterfaceVersion> for (i32, i32)
impl From<&InterfaceVersion> for (i32, i32)
Source§fn from(value: &InterfaceVersion) -> Self
fn from(value: &InterfaceVersion) -> Self
Converts to this type from the input type.
Source§impl From<InterfaceVersion> for (i32, i32)
impl From<InterfaceVersion> for (i32, i32)
Source§fn from(value: InterfaceVersion) -> Self
fn from(value: InterfaceVersion) -> Self
Converts to this type from the input type.
Source§impl Hash for InterfaceVersion
impl Hash for InterfaceVersion
Source§impl Ord for InterfaceVersion
impl Ord for InterfaceVersion
Source§fn cmp(&self, other: &InterfaceVersion) -> Ordering
fn cmp(&self, other: &InterfaceVersion) -> Ordering
1.21.0 (const: unstable) · 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 InterfaceVersion
impl PartialEq for InterfaceVersion
Source§fn eq(&self, other: &InterfaceVersion) -> bool
fn eq(&self, other: &InterfaceVersion) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for InterfaceVersion
impl PartialOrd for InterfaceVersion
impl Copy for InterfaceVersion
impl Eq for InterfaceVersion
impl StructuralPartialEq for InterfaceVersion
Auto Trait Implementations§
impl Freeze for InterfaceVersion
impl RefUnwindSafe for InterfaceVersion
impl Send for InterfaceVersion
impl Sync for InterfaceVersion
impl Unpin for InterfaceVersion
impl UnsafeUnpin for InterfaceVersion
impl UnwindSafe for InterfaceVersion
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.