Skip to main content

Unique

Trait Unique 

Source
pub trait Unique {
    type Metadata;

    // Required methods
    fn id(&self) -> UniqueId
       where Self::Metadata: Empty;
    fn id_with(&self, meta: Self::Metadata) -> UniqueId;
    fn has_id(&self, id: &UniqueId) -> bool
       where Self::Metadata: Empty;

    // Provided method
    fn has_id_with(&self, meta: Self::Metadata, id: &UniqueId) -> bool { ... }
}

Required Associated Types§

Required Methods§

Source

fn id(&self) -> UniqueId
where Self::Metadata: Empty,

Source

fn id_with(&self, meta: Self::Metadata) -> UniqueId

Source

fn has_id(&self, id: &UniqueId) -> bool
where Self::Metadata: Empty,

Provided Methods§

Source

fn has_id_with(&self, meta: Self::Metadata, id: &UniqueId) -> bool

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§