pub struct Schema {
pub id: SchemaId,
pub schema_type: SchemaType,
pub schema: String,
pub fingerprint: Option<String>,
pub references: Vec<SchemaReference>,
pub metadata: Option<SchemaMetadata>,
}Expand description
A registered schema with its metadata
Fields§
§id: SchemaIdUnique schema ID (global)
schema_type: SchemaTypeSchema type/format
schema: StringThe schema definition (JSON string)
fingerprint: Option<String>MD5 fingerprint for deduplication
references: Vec<SchemaReference>Schema references (for nested schemas)
metadata: Option<SchemaMetadata>Schema metadata (name, description, labels)
Implementations§
Source§impl Schema
impl Schema
pub fn new(id: SchemaId, schema_type: SchemaType, schema: String) -> Self
pub fn with_fingerprint(self, fingerprint: String) -> Self
pub fn with_references(self, references: Vec<SchemaReference>) -> Self
pub fn with_metadata(self, metadata: SchemaMetadata) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Schema
impl<'de> Deserialize<'de> for Schema
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Schema
impl RefUnwindSafe for Schema
impl Send for Schema
impl Sync for Schema
impl Unpin for Schema
impl UnsafeUnpin 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