invalid_field = r#"Only `authority = "some-authority"`, `name = "some-name"`, `views = [SomeView, AnotherView]`, `primary_key = u64`, `natural_id = |contents: &Self| Some(contents.id)`, serialization = SerializationFormat` and `core = bonsaidb::core` are supported attributes"#
expected = r#"Specify the `serialization` like so: `serialization = Format` or `serialization = None` to disable deriving it"#
expected = r#"Specify the `natural_id` like so: `natural_id = function_name` or `natural_id = |doc| { .. }`"#
abort_call_site!("If `collection(encryption_required)` is set you need to provide an encryption key via `collection(encryption_key = EncryptionKey)`")
impl #impl_generics #core::schema::SerializedCollection for #ident #ty_generics #where_clause {
impl #impl_generics #core::schema::DefaultSerialization for #ident #ty_generics #where_clause {
fn define_views(schema: &mut #core::schema::Schematic) -> ::core::result::Result<(), #core::Error> {
invalid_field = r#"Only `collection = CollectionType`, `key = KeyType`, `name = "by-name"`, `value = ValueType` and `serialization = SerializationFormat` and `core = bonsaidb::core` are supported attributes"#
missing = r#"You need to specify the collection type via `#[view(collection = CollectionType)]`"#
expected = r#"Specify the `serialization` like so: `serialization = Format` or `serialization = None` to disable deriving it"#
impl #impl_generics #core::schema::DefaultViewSerialization for #ident #ty_generics #where_clause {}
invalid_field = r#"Only `name = "name""`, `authority = "authority"`, `collections = [SomeCollection, AnotherCollection]` and `core = bonsaidb::core` are supported attributes"#
expected = r#"Specify the `collections` like so: `collections = [SomeCollection, AnotherCollection]`"#
/// `#[schema(name = "Name", authority = "Authority", collections = [A, B, C]), core = bonsaidb::core]`