pub enum EventValue<'a> {
Str(Cow<'a, str>),
Int(i64),
Float(f64),
Bool(bool),
Null,
Array(Vec<EventValue<'a>>),
Map(Vec<(Cow<'a, str>, EventValue<'a>)>),
}Expand description
A value retrieved from an event field.
Supports zero-copy borrows from JSON-backed events (Cow::Borrowed)
and owned values from non-JSON sources (Cow::Owned).
Null is distinct from field-absent (get_field returns None).
Variants§
Str(Cow<'a, str>)
Int(i64)
Float(f64)
Bool(bool)
Null
Array(Vec<EventValue<'a>>)
Map(Vec<(Cow<'a, str>, EventValue<'a>)>)
Implementations§
Trait Implementations§
Source§impl<'a> Clone for EventValue<'a>
impl<'a> Clone for EventValue<'a>
Source§fn clone(&self) -> EventValue<'a>
fn clone(&self) -> EventValue<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for EventValue<'a>
impl<'a> Debug for EventValue<'a>
Source§impl<'a> From<&'a Value> for EventValue<'a>
impl<'a> From<&'a Value> for EventValue<'a>
Source§impl<'a> PartialEq for EventValue<'a>
impl<'a> PartialEq for EventValue<'a>
impl<'a> StructuralPartialEq for EventValue<'a>
Auto Trait Implementations§
impl<'a> Freeze for EventValue<'a>
impl<'a> RefUnwindSafe for EventValue<'a>
impl<'a> Send for EventValue<'a>
impl<'a> Sync for EventValue<'a>
impl<'a> Unpin for EventValue<'a>
impl<'a> UnsafeUnpin for EventValue<'a>
impl<'a> UnwindSafe for EventValue<'a>
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