pub struct ExtensionSchema {
pub namespace: String,
pub version: SchemaVersion,
pub applies_to: Vec<RecordKind>,
pub fields: BTreeMap<String, FieldSpec>,
pub description: String,
}Expand description
Describes one extension namespace.
Fields§
§namespace: String§version: SchemaVersion§applies_to: Vec<RecordKind>Record kinds the extension may be attached to (empty = any kind).
fields: BTreeMap<String, FieldSpec>§description: StringImplementations§
Source§impl ExtensionSchema
impl ExtensionSchema
pub fn new(namespace: &str, version: SchemaVersion) -> Self
pub fn applies_to(self, kinds: impl IntoIterator<Item = RecordKind>) -> Self
pub fn field(self, name: &str, spec: FieldSpec) -> Self
pub fn describe(self, d: &str) -> Self
Trait Implementations§
Source§impl Clone for ExtensionSchema
impl Clone for ExtensionSchema
Source§fn clone(&self) -> ExtensionSchema
fn clone(&self) -> ExtensionSchema
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 ExtensionSchema
impl Debug for ExtensionSchema
Source§impl<'de> Deserialize<'de> for ExtensionSchema
impl<'de> Deserialize<'de> for ExtensionSchema
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 PartialEq for ExtensionSchema
impl PartialEq for ExtensionSchema
Source§impl Serialize for ExtensionSchema
impl Serialize for ExtensionSchema
impl StructuralPartialEq for ExtensionSchema
Auto Trait Implementations§
impl Freeze for ExtensionSchema
impl RefUnwindSafe for ExtensionSchema
impl Send for ExtensionSchema
impl Sync for ExtensionSchema
impl Unpin for ExtensionSchema
impl UnsafeUnpin for ExtensionSchema
impl UnwindSafe for ExtensionSchema
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