pub trait KeylikeExt<const MCL: usize, const MCC: usize, const MPL: usize, S>: Keylike<MCL, MCC, MPL, S> {
// Provided methods
fn wdm_key_eq<OtherKey>(&self, other: &OtherKey) -> bool
where OtherKey: Keylike<MCL, MCC, MPL, S>,
S: PartialEq { ... }
fn wdm_key_ne<OtherKey>(&self, other: &OtherKey) -> bool
where OtherKey: Keylike<MCL, MCC, MPL, S>,
S: PartialEq { ... }
}Expand description
Provided Methods§
Sourcefn wdm_key_eq<OtherKey>(&self, other: &OtherKey) -> bool
fn wdm_key_eq<OtherKey>(&self, other: &OtherKey) -> bool
Returns whether self and other describe equal keys, i.e., whether their subspace ids and paths are both equal.
§Examples
use willow_data_model::prelude::*;
assert!(("alfie", Path::<4, 4, 4>::new()).wdm_key_eq(&("alfie", Path::<4, 4, 4>::new())));
assert!(!("alfie", Path::<4, 4, 4>::new()).wdm_key_eq(&("betty", Path::<4, 4, 4>::new())));Sourcefn wdm_key_ne<OtherKey>(&self, other: &OtherKey) -> bool
fn wdm_key_ne<OtherKey>(&self, other: &OtherKey) -> bool
Returns whether self and other describe non-equal keys, i.e., whether their subspace ids and paths are not both equal.
§Examples
use willow_data_model::prelude::*;
assert!(!("alfie", Path::<4, 4, 4>::new()).wdm_key_ne(&("alfie", Path::<4, 4, 4>::new())));
assert!(("alfie", Path::<4, 4, 4>::new()).wdm_key_ne(&("betty", Path::<4, 4, 4>::new())));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.