pub trait EipsOptions: Sealed {
type SupportsMove: SupportsMove;
type ListFanout: ListFanout;
type ChunkSize: ChunkSize;
}Expand description
Required Associated Types§
Sourcetype SupportsMove: SupportsMove
type SupportsMove: SupportsMove
Whether move operations are supported. If true, you can call
Eips::mv to move an item to another position.
The value of this option should be the same for all clients in a distributed system. A client that supports move operations cannot communicate with one that doesn’t.
More memory is used when this option is enabled. Each list item (including deleted elements) will use 8 to 14 bytes of additional memory, depending on the size and alignment of the ID type (due to padding).
Default: true
Sourcetype ListFanout: ListFanout
type ListFanout: ListFanout
Eips internally uses tree-like structures implemented using linked lists. This option controls the maximum number of children each internal node can have.
Increasing this value decreases the amount of auxiliary memory used, but also decreases performance.
Specifically, the amount of auxiliary memory used by Eips is
Θ(h/f ),1 where f is this value (Self::ListFanout).
Thus, increasing this value decreases the amount of auxiliary memory.
However, it also increases the runtime of many operations by a constant
factor, since many operations are O( f ) (with respect to f only),
such as Eips::remote_get, which is O( f log h).
Default: 12
Sourcetype ChunkSize: ChunkSize
type ChunkSize: ChunkSize
Instead of allocating small regions of memory individually, Eips allocates larger chunks and uses them to serve small allocations. This option controls how many small allocations can be served by each chunk.
Increasing this value decreases the amount of a certain category of auxiliary memory, but also increases the amount of a different category. However, this usually results in a net decrease.
Specifically, the amount of auxiliary memory used by Eips is
worst-case1 Θ(h/c) + Θ(c),2 where c is this value
(Self::ChunkSize).
Thus, increasing this value decreases the Θ(h/c) portion of the auxiliary memory, but increases the Θ(c) portion. However, as h grows, larger values of c typically result in a net decrease of memory.
Default: 32
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.