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