pub struct GoVersion { /* private fields */ }Expand description
Parsed Go version metadata.
Implementations§
Source§impl GoVersion
impl GoVersion
Sourcepub const fn new(
major: u16,
minor: Option<u16>,
patch: Option<u16>,
) -> Result<Self, GoVersionParseError>
pub const fn new( major: u16, minor: Option<u16>, patch: Option<u16>, ) -> Result<Self, GoVersionParseError>
Creates Go version metadata.
§Errors
Returns GoVersionParseError::InvalidVersion when major is zero or
GoVersionParseError::MissingMinor when patch is provided without minor.
Sourcepub const fn family(self) -> Option<GoVersionFamily>
pub const fn family(self) -> Option<GoVersionFamily>
Returns the version family for known Go major release lines.
Trait Implementations§
Source§impl Ord for GoVersion
impl Ord for GoVersion
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 PartialOrd for GoVersion
impl PartialOrd for GoVersion
impl Copy for GoVersion
impl Eq for GoVersion
impl StructuralPartialEq for GoVersion
Auto Trait Implementations§
impl Freeze for GoVersion
impl RefUnwindSafe for GoVersion
impl Send for GoVersion
impl Sync for GoVersion
impl Unpin for GoVersion
impl UnsafeUnpin for GoVersion
impl UnwindSafe for GoVersion
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