pub struct PythonPackageName(/* private fields */);Implementations§
Source§impl PythonPackageName
impl PythonPackageName
Sourcepub fn new(input: &str) -> Result<PythonPackageName, PythonModuleNameError>
pub fn new(input: &str) -> Result<PythonPackageName, PythonModuleNameError>
Creates lightly validated dotted Python name metadata.
§Errors
Returns PythonModuleNameError when input is empty, has empty segments, or contains invalid identifier segments.
Trait Implementations§
Source§impl Clone for PythonPackageName
impl Clone for PythonPackageName
Source§fn clone(&self) -> PythonPackageName
fn clone(&self) -> PythonPackageName
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 PythonPackageName
impl Debug for PythonPackageName
Source§impl Display for PythonPackageName
impl Display for PythonPackageName
Source§impl FromStr for PythonPackageName
impl FromStr for PythonPackageName
Source§type Err = PythonModuleNameError
type Err = PythonModuleNameError
The associated error which can be returned from parsing.
Source§fn from_str(
input: &str,
) -> Result<PythonPackageName, <PythonPackageName as FromStr>::Err>
fn from_str( input: &str, ) -> Result<PythonPackageName, <PythonPackageName as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl Hash for PythonPackageName
impl Hash for PythonPackageName
Source§impl Ord for PythonPackageName
impl Ord for PythonPackageName
Source§fn cmp(&self, other: &PythonPackageName) -> Ordering
fn cmp(&self, other: &PythonPackageName) -> 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 PythonPackageName
impl PartialEq for PythonPackageName
Source§fn eq(&self, other: &PythonPackageName) -> bool
fn eq(&self, other: &PythonPackageName) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for PythonPackageName
impl PartialOrd for PythonPackageName
Source§impl TryFrom<&str> for PythonPackageName
impl TryFrom<&str> for PythonPackageName
Source§type Error = PythonModuleNameError
type Error = PythonModuleNameError
The type returned in the event of a conversion error.
Source§fn try_from(
value: &str,
) -> Result<PythonPackageName, <PythonPackageName as TryFrom<&str>>::Error>
fn try_from( value: &str, ) -> Result<PythonPackageName, <PythonPackageName as TryFrom<&str>>::Error>
Performs the conversion.
impl Eq for PythonPackageName
impl StructuralPartialEq for PythonPackageName
Auto Trait Implementations§
impl Freeze for PythonPackageName
impl RefUnwindSafe for PythonPackageName
impl Send for PythonPackageName
impl Sync for PythonPackageName
impl Unpin for PythonPackageName
impl UnsafeUnpin for PythonPackageName
impl UnwindSafe for PythonPackageName
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