#[non_exhaustive]pub struct SchemaEntry { /* private fields */ }Expand description
Describes the layout of an event type. Does not carry a wire type ID — the ID is assigned by the encoder and tracked externally by the registry.
Implementations§
Source§impl SchemaEntry
impl SchemaEntry
Sourcepub fn new(
name: impl Into<String>,
has_timestamp: bool,
fields: impl IntoIterator<Item = FieldDef>,
) -> Self
pub fn new( name: impl Into<String>, has_timestamp: bool, fields: impl IntoIterator<Item = FieldDef>, ) -> Self
Construct a new schema entry.
Sourcepub fn with_annotations(
name: impl Into<String>,
has_timestamp: bool,
fields: impl IntoIterator<Item = FieldDef>,
annotations: impl IntoIterator<Item = FieldAnnotation>,
) -> Self
pub fn with_annotations( name: impl Into<String>, has_timestamp: bool, fields: impl IntoIterator<Item = FieldDef>, annotations: impl IntoIterator<Item = FieldAnnotation>, ) -> Self
Construct a schema entry with annotations.
Sourcepub fn has_timestamp(&self) -> bool
pub fn has_timestamp(&self) -> bool
Whether events of this type carry a packed timestamp in the event header.
Sourcepub fn annotations(&self) -> &[FieldAnnotation]
pub fn annotations(&self) -> &[FieldAnnotation]
Per-field annotations.
Trait Implementations§
Source§impl Clone for SchemaEntry
impl Clone for SchemaEntry
Source§fn clone(&self) -> SchemaEntry
fn clone(&self) -> SchemaEntry
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 SchemaEntry
impl Debug for SchemaEntry
Source§impl PartialEq for SchemaEntry
impl PartialEq for SchemaEntry
Source§fn eq(&self, other: &SchemaEntry) -> bool
fn eq(&self, other: &SchemaEntry) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for SchemaEntry
impl StructuralPartialEq for SchemaEntry
Auto Trait Implementations§
impl Freeze for SchemaEntry
impl RefUnwindSafe for SchemaEntry
impl Send for SchemaEntry
impl Sync for SchemaEntry
impl Unpin for SchemaEntry
impl UnsafeUnpin for SchemaEntry
impl UnwindSafe for SchemaEntry
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