Struct DataMarkerId

struct DataMarkerId { ... }

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

impl DataMarkerId

const fn hashed(self: 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]);

impl Clone for DataMarkerId

fn clone(self: &Self) -> DataMarkerId

impl Copy for DataMarkerId

impl Debug for DataMarkerId

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl Eq for DataMarkerId

impl Freeze for DataMarkerId

impl Hash for DataMarkerId

fn hash<H: core::hash::Hasher>(self: &Self, state: &mut H)

impl Ord for DataMarkerId

fn cmp(self: &Self, other: &Self) -> Ordering

impl PartialEq for DataMarkerId

fn eq(self: &Self, other: &Self) -> bool

impl PartialOrd for DataMarkerId

fn partial_cmp(self: &Self, other: &Self) -> Option<Ordering>

impl RefUnwindSafe for DataMarkerId

impl Send for DataMarkerId

impl Sync for DataMarkerId

impl Unpin for DataMarkerId

impl UnsafeUnpin for DataMarkerId

impl UnwindSafe for DataMarkerId

impl<T> Any for DataMarkerId

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for DataMarkerId

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for DataMarkerId

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for DataMarkerId

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> ErasedDestructor for DataMarkerId

impl<T> From for DataMarkerId

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for DataMarkerId

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T, U> Into for DataMarkerId

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for DataMarkerId

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for DataMarkerId

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>