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