pub struct EventTypeRecordBuilder { /* private fields */ }Expand description
Builder for defining the fields of a record-shaped event type.
Obtained by calling EventTypeBuilder::record. Add fields with prop
and finalize with build to return to the SessionBuilder.
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 build(self) -> SessionBuilder
pub fn build(self) -> SessionBuilder
Finalizes the event record type and returns the SessionBuilder.
Auto Trait Implementations§
impl Freeze for EventTypeRecordBuilder
impl RefUnwindSafe for EventTypeRecordBuilder
impl Send for EventTypeRecordBuilder
impl Sync for EventTypeRecordBuilder
impl Unpin 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