#[non_exhaustive]pub struct DataIdentifierCow<'a> {
pub marker_attributes: Cow<'a, DataMarkerAttributes>,
pub locale: 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: 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_unknown(&self) -> bool
pub fn is_unknown(&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§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