pub struct EventBuilder { /* private fields */ }Expand description
Builder for constructing Event instances.
Implementations§
Source§impl EventBuilder
impl EventBuilder
Sourcepub fn coordinates(self, lat: f64, lon: f64) -> Self
pub fn coordinates(self, lat: f64, lon: f64) -> Self
Sets the location from coordinates.
Sourcepub fn timestamp_str(self, s: &str) -> Result<Self>
pub fn timestamp_str(self, s: &str) -> Result<Self>
Sets the timestamp from a parseable string.
Adds multiple tags.
Sourcepub fn sources(self, sources: impl IntoIterator<Item = SourceRef>) -> Self
pub fn sources(self, sources: impl IntoIterator<Item = SourceRef>) -> Self
Adds multiple sources.
Sourcepub fn metadata(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn metadata(self, key: impl Into<String>, value: impl Into<String>) -> Self
Sets a metadata value.
Trait Implementations§
Source§impl Debug for EventBuilder
impl Debug for EventBuilder
Source§impl Default for EventBuilder
impl Default for EventBuilder
Source§fn default() -> EventBuilder
fn default() -> EventBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EventBuilder
impl RefUnwindSafe for EventBuilder
impl Send for EventBuilder
impl Sync for EventBuilder
impl Unpin 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