Struct icu_provider::prelude::DataIdentifierCow
source · #[non_exhaustive]pub struct DataIdentifierCow<'a> {
pub marker_attributes: Cow<'a, DataMarkerAttributes>,
pub locale: Cow<'a, DataLocale>,
}
Expand description
A data identifier identifies a particular version of data, such as “English”.
It is a wrapper around a DataLocale
and a DataMarkerAttributes
.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.marker_attributes: Cow<'a, DataMarkerAttributes>
Marker-specific request attributes
locale: Cow<'a, DataLocale>
The CLDR locale
Implementations§
source§impl<'a> DataIdentifierCow<'a>
impl<'a> DataIdentifierCow<'a>
sourcepub fn as_borrowed(&'a self) -> DataIdentifierBorrowed<'a>
pub fn as_borrowed(&'a self) -> DataIdentifierBorrowed<'a>
Borrows this DataIdentifierCow
as a [DataIdentifierBorrowed<'a>
].
sourcepub fn from_locale(locale: DataLocale) -> Self
pub fn from_locale(locale: DataLocale) -> Self
Creates a DataIdentifierCow
from an owned DataLocale
.
sourcepub fn from_marker_attributes(
marker_attributes: &'a DataMarkerAttributes,
) -> Self
pub fn from_marker_attributes( marker_attributes: &'a DataMarkerAttributes, ) -> Self
Creates a DataIdentifierCow
from a borrowed DataMarkerAttributes
.
sourcepub fn from_marker_attributes_owned(
marker_attributes: Box<DataMarkerAttributes>,
) -> Self
pub fn from_marker_attributes_owned( marker_attributes: Box<DataMarkerAttributes>, ) -> Self
Creates a DataIdentifierCow
from an owned DataMarkerAttributes
.
sourcepub fn from_owned(
marker_attributes: Box<DataMarkerAttributes>,
locale: DataLocale,
) -> Self
pub fn from_owned( marker_attributes: Box<DataMarkerAttributes>, locale: DataLocale, ) -> Self
Creates a DataIdentifierCow
from an owned DataMarkerAttributes
and an owned DataLocale
.
sourcepub fn from_borrowed_and_owned(
marker_attributes: &'a DataMarkerAttributes,
locale: DataLocale,
) -> Self
pub fn from_borrowed_and_owned( marker_attributes: &'a DataMarkerAttributes, locale: DataLocale, ) -> Self
Creates a DataIdentifierCow
from a borrowed DataMarkerAttributes
and an owned DataLocale
.
sourcepub fn is_default(&self) -> bool
pub fn is_default(&self) -> bool
Returns whether this id is equal to the default.
Trait Implementations§
source§impl<'a> Clone for DataIdentifierCow<'a>
impl<'a> Clone for DataIdentifierCow<'a>
source§fn clone(&self) -> DataIdentifierCow<'a>
fn clone(&self) -> DataIdentifierCow<'a>
Returns a copy 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<'a> Debug for DataIdentifierCow<'a>
impl<'a> Debug for DataIdentifierCow<'a>
source§impl Default for DataIdentifierCow<'_>
impl Default for DataIdentifierCow<'_>
source§impl Display for DataIdentifierCow<'_>
impl Display for DataIdentifierCow<'_>
source§impl<'a> Hash for DataIdentifierCow<'a>
impl<'a> Hash for DataIdentifierCow<'a>
source§impl Ord for DataIdentifierCow<'_>
impl Ord for DataIdentifierCow<'_>
source§impl<'a> PartialEq for DataIdentifierCow<'a>
impl<'a> PartialEq for DataIdentifierCow<'a>
source§impl PartialOrd for DataIdentifierCow<'_>
impl PartialOrd for DataIdentifierCow<'_>
impl<'a> Eq for DataIdentifierCow<'a>
impl<'a> StructuralPartialEq for DataIdentifierCow<'a>
Auto Trait Implementations§
impl<'a> Freeze for DataIdentifierCow<'a>
impl<'a> RefUnwindSafe for DataIdentifierCow<'a>
impl<'a> Send for DataIdentifierCow<'a>
impl<'a> Sync for DataIdentifierCow<'a>
impl<'a> Unpin for DataIdentifierCow<'a>
impl<'a> UnwindSafe for DataIdentifierCow<'a>
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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 more