pub struct Market(/* private fields */);Implementations§
Source§impl Market
impl Market
Sourcepub fn new<T: AsRef<str>>(market: T) -> Result<Self, MarketError>
pub fn new<T: AsRef<str>>(market: T) -> Result<Self, MarketError>
Creates a new Market if the value has exactly 2 ASCII uppercase characters.
§Errors
Returns an Err if the value is not exactly 2 ASCII characters.
Sourcepub unsafe fn new_unchecked<T: AsRef<str>>(market: T) -> Self
pub unsafe fn new_unchecked<T: AsRef<str>>(market: T) -> Self
Create a new Market without checking whether the value has exactly 2 ASCII uppercase
characters. This results in undefined behaviour if the value is not exactly 2 ASCII
uppercase characters.
§Safety
The value must be exactly 2 ASCII uppercase characters.
Trait Implementations§
Source§impl Ord for Market
impl Ord for Market
Source§impl PartialOrd for Market
impl PartialOrd for Market
impl Eq for Market
impl StructuralPartialEq for Market
Auto Trait Implementations§
impl Freeze for Market
impl RefUnwindSafe for Market
impl Send for Market
impl Sync for Market
impl Unpin for Market
impl UnwindSafe for Market
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more