pub struct EventBuilder { /* private fields */ }Expand description
Fluent builder for Event.
Implementations§
Source§impl EventBuilder
impl EventBuilder
Sourcepub fn new(event_type: EventType, source: impl Into<String>) -> Self
pub fn new(event_type: EventType, source: impl Into<String>) -> Self
Creates a builder with generated identifiers and an info severity.
pub fn correlation_id(self, scan_id: impl Into<String>) -> Self
pub fn version(self, version: u16) -> Self
pub fn data(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn severity(self, severity: EventSeverity) -> Self
pub fn timestamp_ms(self, timestamp_ms: u64) -> Self
pub fn build(self) -> Event
Auto Trait Implementations§
impl Freeze for EventBuilder
impl RefUnwindSafe for EventBuilder
impl Send for EventBuilder
impl Sync for EventBuilder
impl Unpin for EventBuilder
impl UnsafeUnpin for EventBuilder
impl UnwindSafe for EventBuilder
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