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