Trait Unique

Source
pub trait Unique {
    type Valid: ValidID;

    // Required methods
    fn id(&self) -> &Self::Valid;
    fn into_id(self) -> Self::Valid;
}
Expand description

Any object that implements this type can turn into id

Required Associated Types§

Source

type Valid: ValidID

valid ID type for the specific item

Required Methods§

Source

fn id(&self) -> &Self::Valid

Returns a refrence to the underlying ID

Source

fn into_id(self) -> Self::Valid

Consumes self into its underlying ID

Implementors§