pub type Store = Box<dyn Blocks + Send>;Expand description
A store chosen at run time, which is how every real one arrives.
Send because the stripe it ends up in is worked on by whichever thread has
taken that stripe’s lock. Which thread that is changes from one command to
the next, so a store that could not be sent could not be attached. Every
store there is, which is a file and a vector, meets the bound already.
Aliased Type§
pub struct Store(/* private fields */);Trait Implementations§
Source§impl Blocks for Store
So that a store can be chosen at run time rather than at compile time.
impl Blocks for Store
So that a store can be chosen at run time rather than at compile time.
Keyspace holds its tier behind this box, and the reason
is that the alternative is a type parameter on Keyspace, which would spread
to yo-resp and to every caller of either, all to name a type that only the
code opening the file knows. The dispatch it costs is one indirect call on a
path that is about to read a device, and nothing at all on a warm read, which
never reaches this trait.