Trait PackableStats

Source
pub trait PackableStats {
    // Required methods
    fn pack(&self, packer: RowPacker<'_>);
    fn unpack(
        row: Row,
        metrics: &StorageControllerMetrics,
    ) -> (GlobalId, Option<ReplicaId>, Self);
}
Expand description

A trait that abstracts over user-facing statistics objects that can be packed into a Row and unpacked again. That is they round-trip.

Required Methods§

Source

fn pack(&self, packer: RowPacker<'_>)

Pack self into the Row.

Source

fn unpack( row: Row, metrics: &StorageControllerMetrics, ) -> (GlobalId, Option<ReplicaId>, Self)

Unpack a Row back into a Self.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§