pub struct PlanetarySystemName(/* private fields */);Implementations§
Source§impl PlanetarySystemName
impl PlanetarySystemName
Sourcepub fn new(value: impl AsRef<str>) -> Result<Self, PlanetTextError>
pub fn new(value: impl AsRef<str>) -> Result<Self, PlanetTextError>
Creates a planetary system name from non-empty text.
§Errors
Returns PlanetTextError::EmptySystemName when the trimmed input is empty.
pub fn as_str(&self) -> &str
pub fn into_string(self) -> String
Trait Implementations§
Source§impl AsRef<str> for PlanetarySystemName
impl AsRef<str> for PlanetarySystemName
Source§impl Clone for PlanetarySystemName
impl Clone for PlanetarySystemName
Source§fn clone(&self) -> PlanetarySystemName
fn clone(&self) -> PlanetarySystemName
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 PlanetarySystemName
impl Debug for PlanetarySystemName
Source§impl Display for PlanetarySystemName
impl Display for PlanetarySystemName
Source§impl FromStr for PlanetarySystemName
impl FromStr for PlanetarySystemName
Source§impl Hash for PlanetarySystemName
impl Hash for PlanetarySystemName
Source§impl Ord for PlanetarySystemName
impl Ord for PlanetarySystemName
Source§fn cmp(&self, other: &PlanetarySystemName) -> Ordering
fn cmp(&self, other: &PlanetarySystemName) -> 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 PlanetarySystemName
impl PartialEq for PlanetarySystemName
Source§fn eq(&self, other: &PlanetarySystemName) -> bool
fn eq(&self, other: &PlanetarySystemName) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for PlanetarySystemName
impl PartialOrd for PlanetarySystemName
impl Eq for PlanetarySystemName
impl StructuralPartialEq for PlanetarySystemName
Auto Trait Implementations§
impl Freeze for PlanetarySystemName
impl RefUnwindSafe for PlanetarySystemName
impl Send for PlanetarySystemName
impl Sync for PlanetarySystemName
impl Unpin for PlanetarySystemName
impl UnsafeUnpin for PlanetarySystemName
impl UnwindSafe for PlanetarySystemName
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