Trait Identity

Source
pub trait Identity:
    Hash
    + PartialEq
    + Eq
    + PartialOrd
    + Ord
    + Clone
    + Display
    + Debug {
    // Provided method
    fn escaped(&self) -> String { ... }
}
Expand description

Marker trait that some type corresponds to the identity of some value. Used for graph traversal book-keeping (seen set, querying, etc)

This type must be cheaply clonable. Clones that re-allocate will negatively affect performance of graph traversal

Provided Methods§

Source

fn escaped(&self) -> String

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 Identity for &'static str

Source§

impl Identity for i8

Source§

impl Identity for i16

Source§

impl Identity for i32

Source§

impl Identity for i64

Source§

impl Identity for isize

Source§

impl Identity for u8

Source§

impl Identity for u16

Source§

impl Identity for u32

Source§

impl Identity for u64

Source§

impl Identity for usize

Source§

impl Identity for ChunkId

Source§

impl Identity for ModuleIdentifier

Implementors§

Source§

impl<I> Identity for EdgeIdentity<I>
where I: Identity,