pub struct Schema {
pub name: String,
pub schema_data: Option<Vec<u8>>,
pub type_schema: SchemaType,
}Expand description
Represents a schema for data, including its type and associated schema data.
This struct is used to define how data should be serialized, deserialized, and validated.
Fields:
name: The name of the schema, typically used for identification purposes.schema_data: The schema data itself, which contains the schema’s definition. This is only used whentype_schemaisJson.type_schema: The type of schema that determines the format of the data (e.g., JSON, STRING).
Fields§
§name: String§schema_data: Option<Vec<u8>>§type_schema: SchemaTypeImplementations§
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
Source§impl From<Schema> for Schema
impl From<Schema> for Schema
Source§fn from(proto_schema: ProtoSchema) -> Self
fn from(proto_schema: ProtoSchema) -> Self
Converts to this type from the input type.
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<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