Struct icu_provider::marker::DataMarkerPath
source · pub struct DataMarkerPath { /* private fields */ }
Expand description
The string path of a data marker. For example, “foo@1”
const K: DataMarkerPath =
icu_provider::marker::data_marker_path!("foo/bar@1");
The human-readable path string ends with @
followed by one or more digits (the version
number). Paths do not contain characters other than ASCII letters and digits, _
, /
.
Invalid paths are compile-time errors (as data_marker_path!
uses const
).
ⓘ
const K: DataMarkerPath = icu_provider::marker::data_marker_path!("foo/../bar@1");
Implementations§
source§impl DataMarkerPath
impl DataMarkerPath
sourcepub const fn hashed(self) -> DataMarkerPathHash
pub const fn hashed(self) -> DataMarkerPathHash
Gets a platform-independent hash of a DataMarkerPath
.
The hash is 4 bytes and allows for fast comparison.
§Example
use icu_provider::marker::DataMarkerPath;
use icu_provider::marker::DataMarkerPathHash;
const PATH: DataMarkerPath =
icu_provider::marker::data_marker_path!("foo@1");
const PATH_HASH: DataMarkerPathHash = PATH.hashed();
assert_eq!(PATH_HASH.to_bytes(), [0xe2, 0xb6, 0x17, 0x71]);
Trait Implementations§
source§impl Clone for DataMarkerPath
impl Clone for DataMarkerPath
source§fn clone(&self) -> DataMarkerPath
fn clone(&self) -> DataMarkerPath
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 DataMarkerPath
impl Debug for DataMarkerPath
source§impl Hash for DataMarkerPath
impl Hash for DataMarkerPath
source§impl Ord for DataMarkerPath
impl Ord for DataMarkerPath
source§impl PartialEq for DataMarkerPath
impl PartialEq for DataMarkerPath
source§impl PartialOrd for DataMarkerPath
impl PartialOrd for DataMarkerPath
impl Copy for DataMarkerPath
impl Eq for DataMarkerPath
Auto Trait Implementations§
impl Freeze for DataMarkerPath
impl RefUnwindSafe for DataMarkerPath
impl Send for DataMarkerPath
impl Sync for DataMarkerPath
impl Unpin for DataMarkerPath
impl UnwindSafe for DataMarkerPath
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