#[derive(Document)]
{
// Attributes available to this derive:
#[obj]
}
Expand description
Derive macro for obj::Document.
Emits impl ::obj::Document for <Ident> { ... } with sensible
defaults:
COLLECTIONdefaults to the unqualified type name as a string;#[obj(collection = "explicit_name")]overrides.VERSIONdefaults to1;#[obj(version = N)]overrides.indexes()is omitted (the trait defaultVec::new()is used) when the struct carries no index-related attributes; otherwise the derive emits aVec<::obj::IndexSpec>in field-declaration order.
All emitted paths are absolute (::obj::Document,
::obj::IndexSpec) so the derive is hygienic against local items
that shadow these names.