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