pub struct AbiVersion { /* private fields */ }Expand description
A typed, validated wrapper around an encoded ABI version word.
Construct with AbiVersion::new (from major / minor) or
AbiVersion::decode (from a raw word read off a plugin symbol). It is
Copy, so it is passed and compared by value.
Implementations§
Source§impl AbiVersion
impl AbiVersion
Sourcepub fn new(major: u16, minor: u16) -> Self
pub fn new(major: u16, minor: u16) -> Self
Construct an AbiVersion from explicit (major, minor) components.
Sourcepub fn is_compatible_with(self, other: Self) -> bool
pub fn is_compatible_with(self, other: Self) -> bool
Return true when self and other share the same major
component (i.e. they are ABI-compatible).
Trait Implementations§
Source§impl Clone for AbiVersion
impl Clone for AbiVersion
Source§fn clone(&self) -> AbiVersion
fn clone(&self) -> AbiVersion
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 moreimpl Copy for AbiVersion
Source§impl Debug for AbiVersion
impl Debug for AbiVersion
impl Eq for AbiVersion
Source§impl PartialEq for AbiVersion
impl PartialEq for AbiVersion
impl StructuralPartialEq for AbiVersion
Auto Trait Implementations§
impl Freeze for AbiVersion
impl RefUnwindSafe for AbiVersion
impl Send for AbiVersion
impl Sync for AbiVersion
impl Unpin for AbiVersion
impl UnsafeUnpin for AbiVersion
impl UnwindSafe for AbiVersion
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