Trait Bucket

Source
pub trait Bucket: Sized {
    type Timestamp: BucketTimestamp;

    // Required method
    fn split(self, timestamp: &Self::Timestamp, fuel: &mut i64) -> (Self, Self);
}
Expand description

A type that can be split into two parts based on a timestamp.

Required Associated Types§

Source

type Timestamp: BucketTimestamp

The timestamp type associated with this storage.

Required Methods§

Source

fn split(self, timestamp: &Self::Timestamp, fuel: &mut i64) -> (Self, Self)

Split self in two, based on the timestamp. The result is a pair of self, where the first element contains all data with a timestamp strictly less than timestamp, and the second all other data.

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§