pub struct NullRecorder<E, R>where
E: Env,
R: ReplayBufferBase,{ /* private fields */ }
Expand description
A recorder that discards all records without storing them.
The NullRecorder
implements the Recorder
trait but ignores all records
passed to it. This is useful in several scenarios:
- During debugging when you want to disable logging temporarily
- In testing environments where record storage is not needed
- When you want to measure performance without the overhead of record storage
- As a placeholder when record storage is optional
§Type Parameters
E
- The environment type that implements theEnv
traitR
- The replay buffer type that implements theReplayBufferBase
trait
Implementations§
Source§impl<E, R> NullRecorder<E, R>where
E: Env,
R: ReplayBufferBase,
impl<E, R> NullRecorder<E, R>where
E: Env,
R: ReplayBufferBase,
Trait Implementations§
Source§impl<E, R> Recorder<E, R> for NullRecorder<E, R>where
E: Env,
R: ReplayBufferBase,
impl<E, R> Recorder<E, R> for NullRecorder<E, R>where
E: Env,
R: ReplayBufferBase,
Source§fn write(&mut self, _record: Record)
fn write(&mut self, _record: Record)
Discards the given record without storing it.
This method is a no-op and immediately discards the record.
§Arguments
_record
- The record to be discarded
Source§fn store(&mut self, _record: Record)
fn store(&mut self, _record: Record)
Discards the given record without storing it.
This method is a no-op and immediately discards the record.
§Arguments
_record
- The record to be discarded
Source§fn flush(&mut self, _step: i64)
fn flush(&mut self, _step: i64)
No-op flush operation.
This method does nothing as no records are stored.
§Arguments
_step
- The step at which to flush (ignored)
Auto Trait Implementations§
impl<E, R> Freeze for NullRecorder<E, R>
impl<E, R> RefUnwindSafe for NullRecorder<E, R>where
E: RefUnwindSafe,
R: RefUnwindSafe,
impl<E, R> Send for NullRecorder<E, R>
impl<E, R> Sync for NullRecorder<E, R>
impl<E, R> Unpin for NullRecorder<E, R>
impl<E, R> UnwindSafe for NullRecorder<E, R>where
E: UnwindSafe,
R: UnwindSafe,
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