pub struct TraceSession { /* private fields */ }Implementations§
Source§impl TraceSession
impl TraceSession
pub fn new() -> Self
pub fn with_max_events(max_events: usize) -> Self
pub fn record(&mut self, node: NodeTrace)
pub fn nodes(&self) -> &[NodeTrace]
pub fn events(&self) -> &[NodeTrace]
pub fn dropped_events(&self) -> usize
pub fn source_text(&self) -> Option<&str>
pub fn set_source_text(&mut self, source_text: impl Into<String>)
pub fn write_json<W: Write>(&self, writer: W) -> Result<()>
pub fn write_jsonl<W: Write>(&self, writer: W) -> Result<()>
pub fn from_events(nodes: Vec<NodeTrace>) -> Self
Trait Implementations§
Source§impl Clone for TraceSession
impl Clone for TraceSession
Source§fn clone(&self) -> TraceSession
fn clone(&self) -> TraceSession
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 TraceSession
impl Debug for TraceSession
Source§impl Default for TraceSession
impl Default for TraceSession
Source§fn default() -> TraceSession
fn default() -> TraceSession
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TraceSession
impl RefUnwindSafe for TraceSession
impl Send for TraceSession
impl Sync for TraceSession
impl Unpin for TraceSession
impl UnsafeUnpin for TraceSession
impl UnwindSafe for TraceSession
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