pub struct EventTypeBuilder { /* private fields */ }Expand description
Builder for configuring type information on a SessionBuilder.
Obtained by calling SessionBuilder::declare_type. Use define_record
to define a record-shaped type or custom for a named custom type.
Call done to return to the SessionBuilder.
Implementations§
Source§impl EventTypeBuilder
impl EventTypeBuilder
Sourcepub fn define_record(self) -> EventTypeRecordBuilder
pub fn define_record(self) -> EventTypeRecordBuilder
Starts building a record-shaped event type with named fields.
Sourcepub fn default_event_type(self, tpe: Type) -> Self
pub fn default_event_type(self, tpe: Type) -> Self
Sets the default event type used when no data source-specific type is found.
Sourcepub fn data_source(self, data_source: &str, tpe: Type) -> Self
pub fn data_source(self, data_source: &str, tpe: Type) -> Self
Registers a type for a specific named data source.
Queries targeting data_source will use tpe for type checking instead of the default event type.
Data source names are case-insensitive.
Sourcepub fn custom_default_event_type(self, name: &str) -> Self
pub fn custom_default_event_type(self, name: &str) -> Self
Declares a custom event type by name for as default event type.
Sourcepub fn custom_for_data_source(self, name: &str, data_source: &str) -> Self
pub fn custom_for_data_source(self, name: &str, data_source: &str) -> Self
Declares a custom event type by name for a data source.
Sourcepub fn done(self) -> SessionBuilder
pub fn done(self) -> SessionBuilder
Finalizes type configuration and returns the SessionBuilder.
Auto Trait Implementations§
impl Freeze for EventTypeBuilder
impl RefUnwindSafe for EventTypeBuilder
impl Send for EventTypeBuilder
impl Sync for EventTypeBuilder
impl Unpin for EventTypeBuilder
impl UnsafeUnpin for EventTypeBuilder
impl UnwindSafe for EventTypeBuilder
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