pub struct ContextRecord<'a, P: ContextRecordPayload> {
pub record_schema: &'static str,
pub timestamp: u128,
pub level: &'static str,
pub event: &'static str,
pub context: UnifiedContext<'a>,
pub payload: P,
}Fields§
§record_schema: &'static str§timestamp: u128§level: &'static str§event: &'static str§context: UnifiedContext<'a>§payload: PImplementations§
Source§impl<P: ContextRecordPayload> ContextRecord<'_, P>
impl<P: ContextRecordPayload> ContextRecord<'_, P>
pub fn contains(&self, path: &str) -> bool
pub fn write_selected<W: Write>(&self, path: &str, writer: &mut W) -> Result<()>
Sourcepub fn write_summary<W: Write>(
&self,
profile: &SummaryProfile,
writer: &mut W,
) -> Result<()>
pub fn write_summary<W: Write>( &self, profile: &SummaryProfile, writer: &mut W, ) -> Result<()>
Values always use JSON literal escaping, including text interpolation.
Trait Implementations§
Source§impl<'a, P> Serialize for ContextRecord<'a, P>where
P: Serialize + ContextRecordPayload,
impl<'a, P> Serialize for ContextRecord<'a, P>where
P: Serialize + ContextRecordPayload,
Auto Trait Implementations§
impl<'a, P> !RefUnwindSafe for ContextRecord<'a, P>
impl<'a, P> !UnwindSafe for ContextRecord<'a, P>
impl<'a, P> Freeze for ContextRecord<'a, P>where
P: Freeze,
impl<'a, P> Send for ContextRecord<'a, P>where
P: Send,
impl<'a, P> Sync for ContextRecord<'a, P>where
P: Sync,
impl<'a, P> Unpin for ContextRecord<'a, P>where
P: Unpin,
impl<'a, P> UnsafeUnpin for ContextRecord<'a, P>where
P: UnsafeUnpin,
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