RankFuncCount

Trait RankFuncCount 

Source
pub trait RankFuncCount: Default + EstimateSize {
    // Required methods
    fn count(&mut self, curr_key: StateKey) -> i64;
    fn to_proto_state(&self) -> FunctionState;
    fn from_proto_state(state: FunctionState) -> Result<Self>
       where Self: Sized;
}

Required Methods§

Source

fn count(&mut self, curr_key: StateKey) -> i64

Count and return the rank for the given key, updating internal state.

Source

fn to_proto_state(&self) -> FunctionState

Convert the function state to the proto oneof variant for persistence.

Source

fn from_proto_state(state: FunctionState) -> Result<Self>
where Self: Sized,

Restore the function state from the proto oneof variant. Returns an error if the variant does not match this function type.

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§