pub struct NormalizedEvent {
pub event_id: String,
pub timestamp: DateTime<Utc>,
pub source: SourceReference,
pub session: SessionIdentity,
pub queryid: Option<String>,
pub kind: EventKind,
}Expand description
Normalized PostgreSQL event.
Fields§
§event_id: String§timestamp: DateTime<Utc>§source: SourceReference§session: SessionIdentity§queryid: Option<String>§kind: EventKindImplementations§
Source§impl NormalizedEvent
impl NormalizedEvent
pub fn from_log_entry( entry: &LogEntry, source_kind: EventSourceKind, record_index: usize, ) -> Self
pub fn is_query(&self) -> bool
pub fn is_error(&self) -> bool
pub fn duration_ms(&self) -> Option<f64>
pub fn queries(&self) -> Option<&[Query]>
pub fn normalized_query(&self) -> Option<String>
pub fn message(&self) -> &str
Trait Implementations§
Source§impl Clone for NormalizedEvent
impl Clone for NormalizedEvent
Source§fn clone(&self) -> NormalizedEvent
fn clone(&self) -> NormalizedEvent
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 Debug for NormalizedEvent
impl Debug for NormalizedEvent
Source§impl<'de> Deserialize<'de> for NormalizedEvent
impl<'de> Deserialize<'de> for NormalizedEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for NormalizedEvent
impl RefUnwindSafe for NormalizedEvent
impl Send for NormalizedEvent
impl Sync for NormalizedEvent
impl Unpin for NormalizedEvent
impl UnsafeUnpin for NormalizedEvent
impl UnwindSafe for NormalizedEvent
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