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