pub struct CorrelationEntry {
pub timestamp: f64,
pub level: CorrelationLevel,
pub message: String,
}Expand description
A single log entry in a stream.
Fields§
§timestamp: f64Timestamp for time-alignment (seconds since an arbitrary epoch).
level: CorrelationLevelSeverity level.
message: StringThe log message text.
Implementations§
Source§impl CorrelationEntry
impl CorrelationEntry
Sourcepub fn new(
timestamp: f64,
level: CorrelationLevel,
message: impl Into<String>,
) -> Self
pub fn new( timestamp: f64, level: CorrelationLevel, message: impl Into<String>, ) -> Self
Creates a new correlation entry.
§Example
use envision::component::{CorrelationEntry, CorrelationLevel};
let entry = CorrelationEntry::new(1.0, CorrelationLevel::Info, "Request received");
assert_eq!(entry.timestamp, 1.0);
assert_eq!(entry.level, CorrelationLevel::Info);
assert_eq!(entry.message, "Request received");Trait Implementations§
Source§impl Clone for CorrelationEntry
impl Clone for CorrelationEntry
Source§fn clone(&self) -> CorrelationEntry
fn clone(&self) -> CorrelationEntry
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 CorrelationEntry
impl Debug for CorrelationEntry
Source§impl<'de> Deserialize<'de> for CorrelationEntry
impl<'de> Deserialize<'de> for CorrelationEntry
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
Source§impl PartialEq for CorrelationEntry
impl PartialEq for CorrelationEntry
Source§impl Serialize for CorrelationEntry
impl Serialize for CorrelationEntry
impl StructuralPartialEq for CorrelationEntry
Auto Trait Implementations§
impl Freeze for CorrelationEntry
impl RefUnwindSafe for CorrelationEntry
impl Send for CorrelationEntry
impl Sync for CorrelationEntry
impl Unpin for CorrelationEntry
impl UnsafeUnpin for CorrelationEntry
impl UnwindSafe for CorrelationEntry
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more