pub struct CarrierCode(/* private fields */);Expand description
A carrier: ISO 3166 alpha-3 country code and ITU M.1400 carrier code, e.g. DEU.EKP1.
XSD CarrierCode: [0-9A-Z]{3}\.[0-9A-Z]{1,6}.
Implementations§
Source§impl CarrierCode
impl CarrierCode
Sourcepub fn new(value: impl AsRef<str>) -> Result<CarrierCode, ValueError>
pub fn new(value: impl AsRef<str>) -> Result<CarrierCode, ValueError>
Parses a value, applying the schema’s whitespace facet first.
§Errors
ValueError naming the violated facet.
Trait Implementations§
Source§impl AsRef<str> for CarrierCode
impl AsRef<str> for CarrierCode
Source§impl Clone for CarrierCode
impl Clone for CarrierCode
Source§fn clone(&self) -> CarrierCode
fn clone(&self) -> CarrierCode
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 CarrierCode
impl Debug for CarrierCode
Source§impl Display for CarrierCode
impl Display for CarrierCode
impl Eq for CarrierCode
Source§impl FromStr for CarrierCode
impl FromStr for CarrierCode
Source§type Err = ValueError
type Err = ValueError
The associated error which can be returned from parsing.
Source§fn from_str(s: &str) -> Result<CarrierCode, <CarrierCode as FromStr>::Err>
fn from_str(s: &str) -> Result<CarrierCode, <CarrierCode as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl Hash for CarrierCode
impl Hash for CarrierCode
Source§impl Ord for CarrierCode
impl Ord for CarrierCode
Source§fn cmp(&self, other: &CarrierCode) -> Ordering
fn cmp(&self, other: &CarrierCode) -> 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for CarrierCode
impl PartialEq for CarrierCode
Source§impl PartialOrd for CarrierCode
impl PartialOrd for CarrierCode
impl StructuralPartialEq for CarrierCode
Source§impl TryFrom<&str> for CarrierCode
impl TryFrom<&str> for CarrierCode
Source§type Error = ValueError
type Error = ValueError
The type returned in the event of a conversion error.
Source§fn try_from(
s: &str,
) -> Result<CarrierCode, <CarrierCode as TryFrom<&str>>::Error>
fn try_from( s: &str, ) -> Result<CarrierCode, <CarrierCode as TryFrom<&str>>::Error>
Performs the conversion.
Auto Trait Implementations§
impl Forget for CarrierCode
impl Freeze for CarrierCode
impl Move for CarrierCode
impl RefUnwindSafe for CarrierCode
impl Send for CarrierCode
impl Sync for CarrierCode
impl Unpin for CarrierCode
impl UnsafeUnpin for CarrierCode
impl UnwindSafe for CarrierCode
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