pub struct Stream(/* private fields */);
Expand description
TODO: Improve encapsulation. Stream of profiling events from one thread.
Implementations§
source§impl Stream
impl Stream
sourcepub fn begin_scope<F: Fn() -> i64>(
&mut self,
now_ns: F,
scope_id: ScopeId,
data: &str
) -> (usize, NanoSecond)
pub fn begin_scope<F: Fn() -> i64>( &mut self, now_ns: F, scope_id: ScopeId, data: &str ) -> (usize, NanoSecond)
Marks the beginning of the scope. Returns position where to write scope size once the scope is closed
sourcepub fn end_scope(&mut self, start_offset: usize, stop_ns: NanoSecond)
pub fn end_scope(&mut self, start_offset: usize, stop_ns: NanoSecond)
Marks the end of the scope.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Stream
impl RefUnwindSafe for Stream
impl Send for Stream
impl Sync for Stream
impl Unpin for Stream
impl UnwindSafe for Stream
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