pub struct DataMarkerId { /* private fields */ }
Expand description
The ID of a data marker.
This is generally a DataMarkerIdHash
. If debug assertions or the export
Cargo feature
are enabled, this also contains a human-readable string for an improved Debug
implementation.
Implementations§
Source§impl DataMarkerId
impl DataMarkerId
Sourcepub const fn hashed(self) -> DataMarkerIdHash
pub const fn hashed(self) -> DataMarkerIdHash
Gets a platform-independent hash of a DataMarkerId
.
The hash is 4 bytes and allows for fast comparison.
§Example
use icu_provider::prelude::*;
icu_provider::data_marker!(FooV1, &'static str);
assert_eq!(FooV1::INFO.id.hashed().to_bytes(), [198, 217, 86, 48]);
Trait Implementations§
Source§impl Clone for DataMarkerId
impl Clone for DataMarkerId
Source§fn clone(&self) -> DataMarkerId
fn clone(&self) -> DataMarkerId
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 Debug for DataMarkerId
impl Debug for DataMarkerId
Source§impl Hash for DataMarkerId
impl Hash for DataMarkerId
Source§impl Ord for DataMarkerId
impl Ord for DataMarkerId
Source§impl PartialEq for DataMarkerId
impl PartialEq for DataMarkerId
Source§impl PartialOrd for DataMarkerId
impl PartialOrd for DataMarkerId
impl Copy for DataMarkerId
impl Eq for DataMarkerId
Auto Trait Implementations§
impl Freeze for DataMarkerId
impl RefUnwindSafe for DataMarkerId
impl Send for DataMarkerId
impl Sync for DataMarkerId
impl Unpin for DataMarkerId
impl UnwindSafe for DataMarkerId
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