pub struct EventTypeRecordBuilder { /* private fields */ }Expand description
Builder for defining the fields of a record-shaped event type.
Obtained by calling EventTypeBuilder::define_record. Add fields with prop
and finalize with as_default_event_type or
for_data_source to return to the EventTypeBuilder.
Implementations§
Source§impl EventTypeRecordBuilder
impl EventTypeRecordBuilder
Sourcepub fn prop_when(self, test: bool, name: &str, tpe: Type) -> Self
pub fn prop_when(self, test: bool, name: &str, tpe: Type) -> Self
Conditionally adds a field to the event record type.
Sourcepub fn prop(self, name: &str, tpe: Type) -> Self
pub fn prop(self, name: &str, tpe: Type) -> Self
Adds a field with the given name and type to the event record type.
Sourcepub fn prop_with_custom_when(self, test: bool, name: &str, tpe: &str) -> Self
pub fn prop_with_custom_when(self, test: bool, name: &str, tpe: &str) -> Self
Conditionally adds a field with a custom type to the event record type.
Sourcepub fn as_default_event_type(self) -> EventTypeBuilder
pub fn as_default_event_type(self) -> EventTypeBuilder
Finalizes the event record type and returns the SessionBuilder.
Sourcepub fn for_data_source(self, data_source: &str) -> EventTypeBuilder
pub fn for_data_source(self, data_source: &str) -> EventTypeBuilder
Finalizes the record type and registers it for a specific named data source.
Queries targeting data_source will use this record type for type checking.
Data source names are case-insensitive. Returns the EventTypeBuilder to allow
chaining further type declarations.
Auto Trait Implementations§
impl Freeze for EventTypeRecordBuilder
impl RefUnwindSafe for EventTypeRecordBuilder
impl Send for EventTypeRecordBuilder
impl Sync for EventTypeRecordBuilder
impl Unpin for EventTypeRecordBuilder
impl UnsafeUnpin for EventTypeRecordBuilder
impl UnwindSafe for EventTypeRecordBuilder
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