Skip to main content

Document

Trait Document 

Source
pub trait Document: Field + Indexed {
    type Id: Field + Asked;

    // Required method
    fn id(&self) -> &Self::Id;
}
Expand description

A type that is a whole document: a Field with an id and its indexes.

Written by #[derive(Yo)] from the field marked #[yo(id)].

Required Associated Types§

Source

type Id: Field + Asked

The type of the field marked #[yo(id)].

Required Methods§

Source

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

This document’s id.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§