pub trait Nameable<'a, Id> {
    // Required method
    fn name(self) -> Result<NamedReference<'a, Id>, Error>;
}
Expand description

A type that can be used as a unique reference for a collection that implements NamedCollection.

Required Methods§

fn name(self) -> Result<NamedReference<'a, Id>, Error>

Returns this name as a NamedReference.

Implementations on Foreign Types§

§

impl<'a, Id> Nameable<'a, Id> for String

§

fn name(self) -> Result<NamedReference<'a, Id>, Error>

§

impl<'a, Id> Nameable<'a, Id> for &'a str

§

fn name(self) -> Result<NamedReference<'a, Id>, Error>

§

impl<'a, Id> Nameable<'a, Id> for &'a String

§

fn name(self) -> Result<NamedReference<'a, Id>, Error>

§

impl<'a> Nameable<'a, u64> for u64

§

fn name(self) -> Result<NamedReference<'a, u64>, Error>

Implementors§

§

impl<'a, 'b, Id> Nameable<'a, Id> for &'a BorrowedDocument<'b>

§

impl<'a, C> Nameable<'a, <C as Collection>::PrimaryKey> for &'a CollectionDocument<C>where C: SerializedCollection,

§

impl<'a, Id> Nameable<'a, Id> for &'a NamedReference<'a, Id>where Id: Clone,

§

impl<'a, Id> Nameable<'a, Id> for NamedReference<'a, Id>

§

impl<'a, Id> Nameable<'a, Id> for DocumentId