referrerpolicy=no-referrer-when-downgrade
relay_substrate_client::metrics

Trait FloatStorageValue

Source
pub trait FloatStorageValue:
    'static
    + Clone
    + Send
    + Sync {
    type Value: FixedPointNumber;

    // Required method
    fn decode(
        &self,
        maybe_raw_value: Option<StorageData>,
    ) -> Result<Option<Self::Value>, SubstrateError>;
}
Expand description

Fied-point storage value and the way it is decoded from the raw storage value.

Required Associated Types§

Source

type Value: FixedPointNumber

Type of the value.

Required Methods§

Source

fn decode( &self, maybe_raw_value: Option<StorageData>, ) -> Result<Option<Self::Value>, SubstrateError>

Try to decode value from the raw storage value.

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§