#[repr(C)]pub struct SemanticVersion {
pub major: u8,
pub minor: u8,
pub patch: u8,
pub prerel: u16,
}Expand description
Semantic version major.minor.patch with pre-release support.
6 bytes in memory (#[repr(C)] + u16 alignment); returned by
componentVersion() via hidden pointer on both ABIs.
Fields§
§major: u8§minor: u8§patch: u8§prerel: u16Implementations§
Source§impl SemanticVersion
impl SemanticVersion
pub const fn new(major: u8, minor: u8, patch: u8) -> SemanticVersion
pub const fn with_prerel( major: u8, minor: u8, patch: u8, prerel: u16, ) -> SemanticVersion
Trait Implementations§
Source§impl Clone for SemanticVersion
impl Clone for SemanticVersion
Source§fn clone(&self) -> SemanticVersion
fn clone(&self) -> SemanticVersion
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 SemanticVersion
Source§impl Debug for SemanticVersion
impl Debug for SemanticVersion
impl Eq for SemanticVersion
Source§impl PartialEq for SemanticVersion
impl PartialEq for SemanticVersion
impl StructuralPartialEq for SemanticVersion
Auto Trait Implementations§
impl Freeze for SemanticVersion
impl RefUnwindSafe for SemanticVersion
impl Send for SemanticVersion
impl Sync for SemanticVersion
impl Unpin for SemanticVersion
impl UnsafeUnpin for SemanticVersion
impl UnwindSafe for SemanticVersion
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