pub struct Schema { /* private fields */ }
Expand description
Schema is a schema that can be registered within Schema Registry
Implementations§
Source§impl Schema
impl Schema
Sourcepub fn new(
schema: impl Into<String>,
format: SchemaFormat,
references: Vec<Reference>,
) -> Schema
pub fn new( schema: impl Into<String>, format: SchemaFormat, references: Vec<Reference>, ) -> Schema
Create a new schema with a given format and references
Sourcepub fn new_avro(schema: String, references: Vec<Reference>) -> Schema
pub fn new_avro(schema: String, references: Vec<Reference>) -> Schema
Create a new avro schema with the given references
Sourcepub fn new_protobuf(schema: String, references: Vec<Reference>) -> Schema
pub fn new_protobuf(schema: String, references: Vec<Reference>) -> Schema
Create a new protobuf schema with the given references
Sourcepub fn format(&self) -> &SchemaFormat
pub fn format(&self) -> &SchemaFormat
Get the format of this schema
Sourcepub fn references(&self) -> &[Reference]
pub fn references(&self) -> &[Reference]
Get all the schemas that are referenced in this schema
Trait Implementations§
impl Eq for Schema
impl StructuralPartialEq for Schema
Auto Trait Implementations§
impl Freeze for Schema
impl RefUnwindSafe for Schema
impl Send for Schema
impl Sync for Schema
impl Unpin for Schema
impl UnwindSafe for Schema
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.