Struct WeatherObservationId
pub struct WeatherObservationId(/* private fields */);Expand description
A non-empty weather observation identifier.
Implementations§
§impl WeatherObservationId
impl WeatherObservationId
pub fn new(
value: impl AsRef<str>,
) -> Result<WeatherObservationId, WeatherObservationError>
pub fn new( value: impl AsRef<str>, ) -> Result<WeatherObservationId, WeatherObservationError>
Creates a weather observation identifier from non-empty text.
§Errors
Returns WeatherObservationError::EmptyObservationId when the identifier is empty.
pub fn into_string(self) -> String
pub fn into_string(self) -> String
Consumes the identifier and returns the owned string.
Trait Implementations§
§impl AsRef<str> for WeatherObservationId
impl AsRef<str> for WeatherObservationId
§impl Clone for WeatherObservationId
impl Clone for WeatherObservationId
§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 more§impl Debug for WeatherObservationId
impl Debug for WeatherObservationId
§impl Display for WeatherObservationId
impl Display for WeatherObservationId
§impl FromStr for WeatherObservationId
impl FromStr for WeatherObservationId
§type Err = WeatherObservationError
type Err = WeatherObservationError
The associated error which can be returned from parsing.
§fn from_str(
value: &str,
) -> Result<WeatherObservationId, <WeatherObservationId as FromStr>::Err>
fn from_str( value: &str, ) -> Result<WeatherObservationId, <WeatherObservationId as FromStr>::Err>
Parses a string
s to return a value of this type. Read more§impl Hash for WeatherObservationId
impl Hash for WeatherObservationId
§impl Ord for WeatherObservationId
impl Ord for WeatherObservationId
§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
§impl PartialEq for WeatherObservationId
impl PartialEq for WeatherObservationId
§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