Skip to main content

Calls

Struct Calls 

Source
pub struct Calls(/* private fields */);
Expand description

A trace sink that keeps the host calls a run made, in order.

What it is for is the deliverable that says every invocation and trace is linked to an application request identifier. Both reviews operations take that identifier as their first argument, so every HostCall event carries it, and Calls::for_request is the query that shows it.

Implementations§

Source§

impl Calls

Source

pub fn all(&self) -> Vec<RecordedCall>

Every call recorded, as module, op, and the first argument when it was a string.

Source

pub fn for_request(&self, request: &str) -> Vec<String>

The operations recorded under request, in order.

Trait Implementations§

Source§

impl Default for Calls

Source§

fn default() -> Calls

Returns the “default value” for a type. Read more
Source§

impl TraceSink for Calls

Source§

fn record(&self, event: TraceEvent)

Records one event. Must not panic: a broken trace sink should degrade the trace, not the program being traced.
Source§

fn is_recording(&self) -> bool

Whether anything will read what is recorded. Read more

Auto Trait Implementations§

§

impl !Freeze for Calls

§

impl RefUnwindSafe for Calls

§

impl Send for Calls

§

impl Sync for Calls

§

impl Unpin for Calls

§

impl UnsafeUnpin for Calls

§

impl UnwindSafe for Calls

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.