pub struct Registry { /* private fields */ }Expand description
A resolved schema closure: composite schemas by id, plus intrinsic recognition of the primitive ids.
Implementations§
Source§impl Registry
impl Registry
Sourcepub fn new(schemas: impl IntoIterator<Item = Schema>) -> Self
pub fn new(schemas: impl IntoIterator<Item = Schema>) -> Self
Build a registry from a closure of composite schemas. Primitive schemas need not be supplied — they are recognized by their canonical id.
Sourcepub fn try_new(
schemas: impl IntoIterator<Item = Schema>,
) -> Result<Self, CompactError>
pub fn try_new( schemas: impl IntoIterator<Item = Schema>, ) -> Result<Self, CompactError>
Validate a received schema closure before making it executable.
This recomputes every member’s content-derived SchemaId, rejects
references that are neither primitive nor present in the bundle, and
bounds fixed arrays whose elements have zero wire size.
Auto Trait Implementations§
impl Freeze for Registry
impl RefUnwindSafe for Registry
impl Send for Registry
impl Sync for Registry
impl Unpin for Registry
impl UnsafeUnpin for Registry
impl UnwindSafe for Registry
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