pub struct EventDefinitionBuilder { /* private fields */ }Expand description
Builder for constructing an EventDefinition used in emit and listen tasks.
Implementations§
Source§impl EventDefinitionBuilder
impl EventDefinitionBuilder
pub fn new() -> Self
Sourcepub fn with(&mut self, name: &str, value: Value) -> &mut Self
pub fn with(&mut self, name: &str, value: Value) -> &mut Self
Adds a single attribute to the event definition.
Sourcepub fn with_attributes(&mut self, attrs: HashMap<String, Value>) -> &mut Self
pub fn with_attributes(&mut self, attrs: HashMap<String, Value>) -> &mut Self
Replaces all event attributes with the provided map.
Sourcepub fn build(self) -> EventDefinition
pub fn build(self) -> EventDefinition
Builds the EventDefinition.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EventDefinitionBuilder
impl RefUnwindSafe for EventDefinitionBuilder
impl Send for EventDefinitionBuilder
impl Sync for EventDefinitionBuilder
impl Unpin for EventDefinitionBuilder
impl UnsafeUnpin for EventDefinitionBuilder
impl UnwindSafe for EventDefinitionBuilder
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