Trait MappedEq

Source
pub trait MappedEq<T: ?Sized = Self> {
    type BlankId;

    // Required method
    fn mapped_eq<'a, 'b, F: Clone + Fn(&'a Self::BlankId) -> &'b Self::BlankId>(
        &'a self,
        other: &T,
        f: F,
    ) -> bool
       where Self::BlankId: 'a + 'b;
}

Required Associated Types§

Required Methods§

Source

fn mapped_eq<'a, 'b, F: Clone + Fn(&'a Self::BlankId) -> &'b Self::BlankId>( &'a self, other: &T, f: F, ) -> bool
where Self::BlankId: 'a + 'b,

Structural equality with mapped blank identifiers.

Does not care for metadata.

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<'u, 't, U, T: MappedEq<U>> MappedEq<&'u U> for &'t T

Source§

type BlankId = <T as MappedEq<U>>::BlankId

Source§

fn mapped_eq<'a, 'b, F: Clone + Fn(&'a Self::BlankId) -> &'b Self::BlankId>( &'a self, other: &&'u U, f: F, ) -> bool
where Self::BlankId: 'a + 'b,

Source§

impl<T: MappedEq> MappedEq for Option<T>

Source§

type BlankId = <T as MappedEq>::BlankId

Source§

fn mapped_eq<'a, 'b, F: Clone + Fn(&'a Self::BlankId) -> &'b Self::BlankId>( &'a self, other: &Self, f: F, ) -> bool
where Self::BlankId: 'a + 'b,

Source§

impl<T: MappedEq> MappedEq for [T]

Source§

type BlankId = <T as MappedEq>::BlankId

Source§

fn mapped_eq<'a, 'b, F: Clone + Fn(&'a Self::BlankId) -> &'b Self::BlankId>( &'a self, other: &Self, f: F, ) -> bool
where Self::BlankId: 'a + 'b,

Source§

impl<T: MappedEq> MappedEq for Vec<T>

Source§

type BlankId = <T as MappedEq>::BlankId

Source§

fn mapped_eq<'a, 'b, F: Clone + Fn(&'a Self::BlankId) -> &'b Self::BlankId>( &'a self, other: &Self, f: F, ) -> bool
where Self::BlankId: 'a + 'b,

Source§

impl<T: MappedEq> MappedEq for IndexSet<T>

Source§

type BlankId = <T as MappedEq>::BlankId

Source§

fn mapped_eq<'a, 'b, F: Clone + Fn(&'a Self::BlankId) -> &'b Self::BlankId>( &'a self, other: &Self, f: F, ) -> bool
where Self::BlankId: 'a + 'b,

Implementors§

Source§

impl<T: Eq + Hash, B: Eq + Hash> MappedEq for Object<T, B>

Source§

impl<T: Eq + Hash, B: Eq + Hash> MappedEq for List<T, B>

Source§

impl<T: Eq + Hash, B: Eq + Hash> MappedEq for Properties<T, B>

Source§

impl<T: Eq + Hash, B: Eq + Hash> MappedEq for ReverseProperties<T, B>

Source§

impl<T: Eq + Hash, B: Eq + Hash> MappedEq for Node<T, B>

Source§

impl<T: PartialEq, B: PartialEq> MappedEq for Id<T, B>

Source§

impl<T: PartialEq, B: PartialEq> MappedEq for ValidId<T, B>

Source§

impl<T: MappedEq> MappedEq for Indexed<T>