Skip to main content

ReplayInterlocutor

Struct ReplayInterlocutor 

Source
pub struct ReplayInterlocutor { /* private fields */ }
Expand description

Serves recorded answers in order, asking nobody.

The bargain the other two replays strike, for the half that costs most to re-record: a consultation in CI is served from the recording, never asked. That is not a workaround — it is the identical arrangement already in place for the model and for the tools.

Implementations§

Source§

impl ReplayInterlocutor

Source

pub fn new(consultations: Vec<Consultation>) -> ReplayInterlocutor

Source

pub fn lenient(self) -> ReplayInterlocutor

Source

pub fn skipping(self, played: usize) -> ReplayInterlocutor

Start at played, for continuing an interrupted run.

Source

pub fn remaining(&self) -> usize

Answers recorded but never played back.

Trait Implementations§

Source§

impl Interlocutor for ReplayInterlocutor

Source§

fn approve(&mut self, _request: &ApprovalRequest) -> bool

A recorded run’s gates were decided when it was recorded, and a cassette does not carry them. Approving is what lets a recorded run replay at all, and it decides nothing new: the effect already happened once, under a person who said yes.

Source§

fn consult(&mut self, request: &ConsultRequest) -> Result<String, ConsultError>

Put a question to a person and return what they said. Read more

Auto Trait Implementations§

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> Same for T

Source§

type Output = T

Should always be Self
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.