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§
Sourcetype Snapshot: Snapshot<Self> + Serialize + for<'a> Deserialize<'a>
Available on crate feature serde
only.
type Snapshot: Snapshot<Self> + Serialize + for<'a> Deserialize<'a>
serde
only.The snapshot type for this entry type.
Sourcetype Encoded: Encoded
Available on crate feature unicache
only.
type Encoded: Encoded
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.
Sourcetype Encodable: Encodable
Available on crate feature unicache
only.
type Encodable: Encodable
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
.
Sourcetype NotEncodable: NotEncodable
Available on crate feature unicache
only.
type NotEncodable: NotEncodable
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.
Sourcetype EncodeResult: Clone + Debug + Serialize + for<'a> Deserialize<'a>
Available on crate features unicache
and serde
only.
type EncodeResult: Clone + Debug + Serialize + for<'a> Deserialize<'a>
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.
Sourcetype UniCache: UniCache<T = Self> + Serialize + for<'a> Deserialize<'a>
Available on crate features unicache
and serde
only.
type UniCache: UniCache<T = Self> + Serialize + for<'a> Deserialize<'a>
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.