Struct bones_schema::registry::SchemaRegistry
source · pub struct SchemaRegistry {
pub schemas: AppendOnlyVec<Schema>,
/* private fields */
}
Expand description
A schema registry that alloates SchemaId
s for SchemaData
s and returns a registered
&'static Schema
.
Fields§
§schemas: AppendOnlyVec<Schema>
The registered schemas.
Implementations§
source§impl SchemaRegistry
impl SchemaRegistry
sourcepub fn register(&self, schema_data: SchemaData) -> &Schema
pub fn register(&self, schema_data: SchemaData) -> &Schema
Register a schema with the registry.
Auto Trait Implementations§
impl !Freeze for SchemaRegistry
impl !RefUnwindSafe for SchemaRegistry
impl Send for SchemaRegistry
impl Sync for SchemaRegistry
impl Unpin for SchemaRegistry
impl !UnwindSafe for SchemaRegistry
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more