Trait Entry

Source
pub trait Entry: Clone + Debug {
    type Snapshot: Snapshot<Self> + Serialize + for<'a> Deserialize<'a>;
    type Encoded: Encoded;
    type Encodable: Encodable;
    type NotEncodable: NotEncodable;
    type EncodeResult: Clone + Debug + Serialize + for<'a> Deserialize<'a>;
    type UniCache: UniCache<T = Self> + Serialize + for<'a> Deserialize<'a>;
}
Expand description

Type of the entries stored in the log.

Required Associated Types§

Source

type Snapshot: Snapshot<Self> + Serialize + for<'a> Deserialize<'a>

Available on crate feature serde only.

The snapshot type for this entry type.

Source

type Encoded: Encoded

Available on crate feature unicache only.

The encoded type of some data. If there is a cache hit in UniCache, the data will be replaced and get sent over the network as this type instead. E.g., if u8 then the cached Entry (or field of it) will be sent as u8 instead.

Source

type Encodable: Encodable

Available on crate feature unicache only.

The type representing the encodable parts of an Entry. It can be set to Self if the whole Entry is cachable. See docs of pre_process() for an example of deriving Encodable from an Entry.

Source

type NotEncodable: NotEncodable

Available on crate feature unicache only.

The type representing the NOT encodable parts of an Entry. Any NotEncodable data will be transmitted in its original form, without encoding. It can be set to () if the whole Entry is cachable. See docs of pre_process() for an example.

Source

type EncodeResult: Clone + Debug + Serialize + for<'a> Deserialize<'a>

Available on crate features unicache and serde only.

The type that represents the results of trying to encode i.e., if there was a cache hit or miss in UniCache.

Source

type UniCache: UniCache<T = Self> + Serialize + for<'a> Deserialize<'a>

Available on crate features unicache and serde only.

The unicache type for caching popular/re-occurring fields of an entry.

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§