pub struct SchemaRegistry { /* private fields */ }Implementations§
Source§impl SchemaRegistry
impl SchemaRegistry
pub fn with_builtins() -> Self
pub fn register_scalar( &mut self, definition: ScalarDefinition, ) -> Result<(), SchemaRegistryError>
pub fn register_schema( &mut self, definition: SchemaDefinition, ) -> Result<(), SchemaRegistryError>
pub fn get(&self, name: &str) -> Option<&RegistryEntry>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn iter(&self) -> impl Iterator<Item = (&str, &RegistryEntry)>
pub fn validate_scalar_target( &self, target: &str, value: &Value, ) -> Result<(), ScalarValidationError>
pub fn validate_schema_target( &self, target: &str, value: &Value, ) -> Result<(), SchemaValidationError>
pub fn validate_references(&self) -> Result<(), SchemaRegistryError>
Trait Implementations§
Source§impl Clone for SchemaRegistry
impl Clone for SchemaRegistry
Source§fn clone(&self) -> SchemaRegistry
fn clone(&self) -> SchemaRegistry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SchemaRegistry
impl Debug for SchemaRegistry
Source§impl Default for SchemaRegistry
impl Default for SchemaRegistry
Source§impl PartialEq for SchemaRegistry
impl PartialEq for SchemaRegistry
Source§fn eq(&self, other: &SchemaRegistry) -> bool
fn eq(&self, other: &SchemaRegistry) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SchemaRegistry
Auto Trait Implementations§
impl Freeze for SchemaRegistry
impl RefUnwindSafe for SchemaRegistry
impl Send for SchemaRegistry
impl Sync for SchemaRegistry
impl Unpin for SchemaRegistry
impl UnsafeUnpin 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