pub struct SchemaInfo {
pub schema_id: u64,
pub subject: String,
pub version: u32,
pub schema_type: String,
pub schema_definition: Vec<u8>,
pub fingerprint: String,
}Expand description
Information about a schema retrieved from the registry
This is a user-friendly wrapper around the proto GetSchemaResponse. Consumers can use this to fetch and validate schemas.
Fields§
§schema_id: u64Schema ID (identifies the subject)
subject: StringSubject name
version: u32Schema version number
schema_type: StringSchema type (avro, json, protobuf, etc.)
schema_definition: Vec<u8>Schema definition as bytes (e.g., Avro schema JSON, Protobuf descriptor)
fingerprint: StringFingerprint for deduplication
Implementations§
Source§impl SchemaInfo
impl SchemaInfo
Sourcepub fn schema_definition_as_string(&self) -> Option<String>
pub fn schema_definition_as_string(&self) -> Option<String>
Get schema definition as a UTF-8 string (for JSON-based schemas)
Returns None if the schema definition is not valid UTF-8
Trait Implementations§
Source§impl Clone for SchemaInfo
impl Clone for SchemaInfo
Source§fn clone(&self) -> SchemaInfo
fn clone(&self) -> SchemaInfo
Returns a duplicate of the value. Read more
1.0.0 · 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 SchemaInfo
impl Debug for SchemaInfo
Source§impl From<GetSchemaResponse> for SchemaInfo
impl From<GetSchemaResponse> for SchemaInfo
Source§fn from(proto: ProtoGetSchemaResponse) -> Self
fn from(proto: ProtoGetSchemaResponse) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SchemaInfo
impl RefUnwindSafe for SchemaInfo
impl Send for SchemaInfo
impl Sync for SchemaInfo
impl Unpin for SchemaInfo
impl UnwindSafe for SchemaInfo
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request