pub struct GoMajorVersion(/* private fields */);Expand description
Major component of a Go version.
Implementations§
Source§impl GoMajorVersion
impl GoMajorVersion
Sourcepub const fn new(value: u16) -> Result<GoMajorVersion, GoVersionParseError>
pub const fn new(value: u16) -> Result<GoMajorVersion, GoVersionParseError>
Creates a major version component.
§Errors
Returns GoVersionParseError::InvalidVersion when value is zero.
Trait Implementations§
Source§impl Clone for GoMajorVersion
impl Clone for GoMajorVersion
Source§fn clone(&self) -> GoMajorVersion
fn clone(&self) -> GoMajorVersion
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 GoMajorVersion
impl Debug for GoMajorVersion
Source§impl Display for GoMajorVersion
impl Display for GoMajorVersion
Source§impl Hash for GoMajorVersion
impl Hash for GoMajorVersion
Source§impl Ord for GoMajorVersion
impl Ord for GoMajorVersion
Source§fn cmp(&self, other: &GoMajorVersion) -> Ordering
fn cmp(&self, other: &GoMajorVersion) -> 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 GoMajorVersion
impl PartialEq for GoMajorVersion
Source§fn eq(&self, other: &GoMajorVersion) -> bool
fn eq(&self, other: &GoMajorVersion) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for GoMajorVersion
impl PartialOrd for GoMajorVersion
impl Copy for GoMajorVersion
impl Eq for GoMajorVersion
impl StructuralPartialEq for GoMajorVersion
Auto Trait Implementations§
impl Freeze for GoMajorVersion
impl RefUnwindSafe for GoMajorVersion
impl Send for GoMajorVersion
impl Sync for GoMajorVersion
impl Unpin for GoMajorVersion
impl UnsafeUnpin for GoMajorVersion
impl UnwindSafe for GoMajorVersion
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