uniffi_meta

Trait Checksum

Source
pub trait Checksum {
    // Required method
    fn checksum<H: Hasher>(&self, state: &mut H);
}
Expand description

Similar to std::hash::Hash.

Implementations of this trait are expected to update the hasher state in the same way across platforms. #[derive(Checksum)] will do the right thing.

Required Methods§

Source

fn checksum<H: Hasher>(&self, state: &mut H)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Checksum for &str

Source§

fn checksum<H: Hasher>(&self, state: &mut H)

Source§

impl Checksum for bool

Source§

fn checksum<H: Hasher>(&self, state: &mut H)

Source§

impl Checksum for i64

Source§

fn checksum<H: Hasher>(&self, state: &mut H)

Source§

impl Checksum for str

Source§

fn checksum<H: Hasher>(&self, state: &mut H)

Source§

impl Checksum for u64

Source§

fn checksum<H: Hasher>(&self, state: &mut H)

Source§

impl Checksum for String

Source§

fn checksum<H: Hasher>(&self, state: &mut H)

Source§

impl<K: Checksum, V: Checksum> Checksum for BTreeMap<K, V>

Source§

fn checksum<H: Hasher>(&self, state: &mut H)

Source§

impl<T: Checksum> Checksum for Option<T>

Source§

fn checksum<H: Hasher>(&self, state: &mut H)

Source§

impl<T: Checksum> Checksum for [T]

Source§

fn checksum<H: Hasher>(&self, state: &mut H)

Source§

impl<T: Checksum> Checksum for Box<T>

Source§

fn checksum<H: Hasher>(&self, state: &mut H)

Source§

impl<T: Checksum> Checksum for Vec<T>

Source§

fn checksum<H: Hasher>(&self, state: &mut H)

Implementors§