Skip to main content

RecordingHandler

Struct RecordingHandler 

Source
pub struct RecordingHandler<'a, H: ExternalFnHandler + ?Sized> { /* private fields */ }
Expand description

Wraps an ExternalFnHandler and records every inline-Resolved external result into a ReplayRecorder during a live run.

Pure/command bindings resolve inline and are captured here. World-access / async bindings resolve out of band (the handler returns ExternalResult::Pending and the value arrives later via resolve_external), so the consumer records those itself when it supplies the value — it has the name, args, and result at that point.

Implementations§

Source§

impl<'a, H: ExternalFnHandler + ?Sized> RecordingHandler<'a, H>

Source

pub fn new(inner: &'a H, recorder: &'a mut ReplayRecorder) -> Self

Wrap inner, recording its inline-Resolved results into recorder.

Trait Implementations§

Source§

impl<H: ExternalFnHandler + ?Sized> ExternalFnHandler for RecordingHandler<'_, H>

Source§

fn call(&self, name: &str, args: &[Value]) -> ExternalResult

Handle an external function call. Read more

Auto Trait Implementations§

§

impl<'a, H> !Freeze for RecordingHandler<'a, H>

§

impl<'a, H> !RefUnwindSafe for RecordingHandler<'a, H>

§

impl<'a, H> !Sync for RecordingHandler<'a, H>

§

impl<'a, H> !UnwindSafe for RecordingHandler<'a, H>

§

impl<'a, H> Send for RecordingHandler<'a, H>
where H: Sync + ?Sized,

§

impl<'a, H> Unpin for RecordingHandler<'a, H>
where H: ?Sized,

§

impl<'a, H> UnsafeUnpin for RecordingHandler<'a, H>
where H: ?Sized,

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.