pub struct StepBuilder<'w> { /* private fields */ }Expand description
One open step. Recording into it after end does not compile, because
end takes it by value.
Implementations§
Source§impl StepBuilder<'_>
impl StepBuilder<'_>
Sourcepub fn event(&mut self, event: TraceEvent)
pub fn event(&mut self, event: TraceEvent)
Records an input event.
Sourcepub fn message(&mut self, message: TraceMessage)
pub fn message(&mut self, message: TraceMessage)
Records a message. Instants in its Debug text become offsets from boot, and text
past 4 KiB is cut with its full length recorded.
Sourcepub fn state(&mut self, before: &str, after: &str)
pub fn state(&mut self, before: &str, after: &str)
Records the state’s {:#?} text before and after the step as a unified diff, or a
note when either is over 256 KiB.
Sourcepub fn tree(&mut self, yaml: String)
pub fn tree(&mut self, yaml: String)
Sets the semantic tree, as YAML, once the step settled. Without one, the tree is unchanged from the step before.
Sourcepub fn ordinal<I: RawId>(&mut self, raw: I) -> I::Ordinal
pub fn ordinal<I: RawId>(&mut self, raw: I) -> I::Ordinal
Renumbers a raw id, as TraceWriter::ordinal does.
Sourcepub fn end(
self,
outcome: StepOutcome,
at: VirtualDuration,
real: RealSpan,
) -> StepIndex
pub fn end( self, outcome: StepOutcome, at: VirtualDuration, real: RealSpan, ) -> StepIndex
Closes the step at at, with its real-clock span kept apart in real.json.
Trait Implementations§
Auto Trait Implementations§
impl<'w> !UnwindSafe for StepBuilder<'w>
impl<'w> Forget for StepBuilder<'w>
impl<'w> Freeze for StepBuilder<'w>where
&'w mut TraceWriter: Freeze,
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<TraceEvent>: Freeze,
PhantomData<TraceMessage>: Freeze,
PhantomData<TraceTask>: Freeze,
PhantomData<Attempt>: Freeze,
impl<'w> Move for StepBuilder<'w>
impl<'w> RefUnwindSafe for StepBuilder<'w>where
String: RefUnwindSafe,
impl<'w> Send for StepBuilder<'w>where
RawVecInner: Send,
NodeRef<Owned, u64, u32, LeafOrInternal>: Send,
BoxRaw<(u64, u32)>: Send,
&'static str: Send,
String: Send,
NodeRef<Owned, BlobHash, String, LeafOrInternal>: Send,
BoxRaw<(BlobHash, String)>: Send,
NodeRef<Owned, BlobHash, Png, LeafOrInternal>: Send,
BoxRaw<(BlobHash, Png)>: Send,
NodeRef<Owned, BlobHash, usize, LeafOrInternal>: Send,
BoxRaw<(BlobHash, usize)>: Send,
NodeRef<Owned, Producer, SetValZST, LeafOrInternal>: Send,
BoxRaw<(Producer, SetValZST)>: Send,
NodeRef<Owned, String, String, LeafOrInternal>: Send,
BoxRaw<(String, String)>: Send,
impl<'w> Sync for StepBuilder<'w>where
RawVecInner: Sync,
NodeRef<Owned, u64, u32, LeafOrInternal>: Sync,
BoxRaw<(u64, u32)>: Sync,
String: Sync,
NodeRef<Owned, BlobHash, String, LeafOrInternal>: Sync,
BoxRaw<(BlobHash, String)>: Sync,
NodeRef<Owned, BlobHash, Png, LeafOrInternal>: Sync,
BoxRaw<(BlobHash, Png)>: Sync,
NodeRef<Owned, BlobHash, usize, LeafOrInternal>: Sync,
BoxRaw<(BlobHash, usize)>: Sync,
NodeRef<Owned, Producer, SetValZST, LeafOrInternal>: Sync,
BoxRaw<(Producer, SetValZST)>: Sync,
NodeRef<Owned, String, String, LeafOrInternal>: Sync,
BoxRaw<(String, String)>: Sync,
impl<'w> Unpin for StepBuilder<'w>
impl<'w> UnsafeUnpin for StepBuilder<'w>where
&'w mut TraceWriter: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<TraceEvent>: UnsafeUnpin,
PhantomData<TraceMessage>: UnsafeUnpin,
PhantomData<TraceTask>: UnsafeUnpin,
PhantomData<Attempt>: 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