pub struct WeatherObservationId(/* private fields */);Expand description
A non-empty weather observation identifier.
Implementations§
Source§impl WeatherObservationId
impl WeatherObservationId
Sourcepub fn new(value: impl AsRef<str>) -> Result<Self, WeatherObservationError>
pub fn new(value: impl AsRef<str>) -> Result<Self, WeatherObservationError>
Creates a weather observation identifier from non-empty text.
§Errors
Returns WeatherObservationError::EmptyObservationId when the identifier is empty.
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Consumes the identifier and returns the owned string.
Trait Implementations§
Source§impl AsRef<str> for WeatherObservationId
impl AsRef<str> for WeatherObservationId
Source§impl Clone for WeatherObservationId
impl Clone for WeatherObservationId
Source§fn clone(&self) -> WeatherObservationId
fn clone(&self) -> WeatherObservationId
Returns a duplicate of the value. Read more
1.0.0 · 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 WeatherObservationId
impl Debug for WeatherObservationId
Source§impl Display for WeatherObservationId
impl Display for WeatherObservationId
Source§impl FromStr for WeatherObservationId
impl FromStr for WeatherObservationId
Source§impl Hash for WeatherObservationId
impl Hash for WeatherObservationId
Source§impl Ord for WeatherObservationId
impl Ord for WeatherObservationId
Source§fn cmp(&self, other: &WeatherObservationId) -> Ordering
fn cmp(&self, other: &WeatherObservationId) -> Ordering
1.21.0 · 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 WeatherObservationId
impl PartialEq for WeatherObservationId
Source§impl PartialOrd for WeatherObservationId
impl PartialOrd for WeatherObservationId
impl Eq for WeatherObservationId
impl StructuralPartialEq for WeatherObservationId
Auto Trait Implementations§
impl Freeze for WeatherObservationId
impl RefUnwindSafe for WeatherObservationId
impl Send for WeatherObservationId
impl Sync for WeatherObservationId
impl Unpin for WeatherObservationId
impl UnsafeUnpin for WeatherObservationId
impl UnwindSafe for WeatherObservationId
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