Type Alias CompactRecorder
pub type CompactRecorder = NamedMpkFileRecorder<HalfPrecisionSettings>;
Expand description
Recorder optimized for compactness.
It uses the named msgpack format for serialization with half precision. If you are looking for the recorder that offers the smallest file size, have a look at sensitive compact recorder.
Aliased Type§
struct CompactRecorder { /* private fields */ }
Implementations
§impl<S> NamedMpkFileRecorder<S>where
S: PrecisionSettings,
impl<S> NamedMpkFileRecorder<S>where
S: PrecisionSettings,
pub fn new() -> NamedMpkFileRecorder<S>
pub fn new() -> NamedMpkFileRecorder<S>
Constructs a new NamedMpkFileRecorder
.
Trait Implementations
§impl<S> Clone for NamedMpkFileRecorder<S>where
S: Clone + PrecisionSettings,
impl<S> Clone for NamedMpkFileRecorder<S>where
S: Clone + PrecisionSettings,
§fn clone(&self) -> NamedMpkFileRecorder<S>
fn clone(&self) -> NamedMpkFileRecorder<S>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more§impl<S> Debug for NamedMpkFileRecorder<S>where
S: Debug + PrecisionSettings,
impl<S> Debug for NamedMpkFileRecorder<S>where
S: Debug + PrecisionSettings,
§impl<S> Default for NamedMpkFileRecorder<S>where
S: Default + PrecisionSettings,
impl<S> Default for NamedMpkFileRecorder<S>where
S: Default + PrecisionSettings,
§fn default() -> NamedMpkFileRecorder<S>
fn default() -> NamedMpkFileRecorder<S>
Returns the “default value” for a type. Read more
§impl<S, B> FileRecorder<B> for NamedMpkFileRecorder<S>where
S: PrecisionSettings,
B: Backend,
impl<S, B> FileRecorder<B> for NamedMpkFileRecorder<S>where
S: PrecisionSettings,
B: Backend,
§fn file_extension() -> &'static str
fn file_extension() -> &'static str
File extension of the format used by the recorder.
§impl<S, B> Recorder<B> for NamedMpkFileRecorder<S>where
S: PrecisionSettings,
B: Backend,
impl<S, B> Recorder<B> for NamedMpkFileRecorder<S>where
S: PrecisionSettings,
B: Backend,
§type RecordArgs = PathBuf
type RecordArgs = PathBuf
Arguments used to record objects.
§type RecordOutput = ()
type RecordOutput = ()
Record output type.
§fn save_item<I>(
&self,
item: I,
file: <NamedMpkFileRecorder<S> as Recorder<B>>::RecordArgs,
) -> Result<(), RecorderError>where
I: Serialize,
fn save_item<I>(
&self,
item: I,
file: <NamedMpkFileRecorder<S> as Recorder<B>>::RecordArgs,
) -> Result<(), RecorderError>where
I: Serialize,
Saves an item. Read more
§fn load_item<I>(
&self,
file: <NamedMpkFileRecorder<S> as Recorder<B>>::LoadArgs,
) -> Result<I, RecorderError>where
I: DeserializeOwned,
fn load_item<I>(
&self,
file: <NamedMpkFileRecorder<S> as Recorder<B>>::LoadArgs,
) -> Result<I, RecorderError>where
I: DeserializeOwned,
Loads an item. Read more
§fn record<R>(
&self,
record: R,
args: Self::RecordArgs,
) -> Result<Self::RecordOutput, RecorderError>where
R: Record<B>,
fn record<R>(
&self,
record: R,
args: Self::RecordArgs,
) -> Result<Self::RecordOutput, RecorderError>where
R: Record<B>,
Records an item. Read more