Struct InMemoryRuntime
pub struct InMemoryRuntime { /* private fields */ }Expand description
A deterministic, synchronized runtime for scripted tests and small callers.
Implementations§
§impl InMemoryRuntime
impl InMemoryRuntime
pub fn new(metrics: impl IntoIterator<Item = f64>) -> Self
pub fn new(metrics: impl IntoIterator<Item = f64>) -> Self
Creates a runtime whose metric calls consume metrics in order.
pub fn push_metric(&self, metric: f64)
pub fn push_metric(&self, metric: f64)
Adds one metric to the end of the scripted metric sequence.
pub fn train_requests(&self) -> Vec<TrainRequest>
pub fn train_requests(&self) -> Vec<TrainRequest>
Returns typed training requests received so far, in order.
pub fn metric_requests(&self) -> Vec<MetricRequest>
pub fn metric_requests(&self) -> Vec<MetricRequest>
Returns typed metric requests received so far, in order.
pub fn remaining_metrics(&self) -> Vec<f64>
pub fn remaining_metrics(&self) -> Vec<f64>
Returns metrics that have not yet been consumed.
Trait Implementations§
§impl Debug for InMemoryRuntime
impl Debug for InMemoryRuntime
§impl Default for InMemoryRuntime
impl Default for InMemoryRuntime
§impl OniroRuntime for InMemoryRuntime
impl OniroRuntime for InMemoryRuntime
Auto Trait Implementations§
impl !Freeze for InMemoryRuntime
impl RefUnwindSafe for InMemoryRuntime
impl Send for InMemoryRuntime
impl Sync for InMemoryRuntime
impl Unpin for InMemoryRuntime
impl UnsafeUnpin for InMemoryRuntime
impl UnwindSafe for InMemoryRuntime
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