pub struct Packing<'a> { /* private fields */ }Expand description
Whatever a Codec can write down, kept — by a Keeper that never finds
out any of it was ever anything but bytes.
A store and a wire ask an opaque value the same question, so the pair
(keeper, codec) is wired up once here rather than once per tenant. What is
decided here is that the directions are not symmetrical: failing to
name a value costs the name and the run goes on, while failing to keep it
or to read it back is the keeper’s error.
Implementations§
Trait Implementations§
Source§impl Keeper for Packing<'_>
impl Keeper for Packing<'_>
Source§fn present(&self, keys: &[&Key]) -> Result<Vec<bool>, KeeperError>
fn present(&self, keys: &[&Key]) -> Result<Vec<bool>, KeeperError>
Straight through: whether something is kept is a question about names, and a codec has nothing to say about a name.
Source§fn key_of(&self, value: &Value) -> Option<Key>
fn key_of(&self, value: &Value) -> Option<Key>
The key of a value by its content, which only a root needs: from
there down, keys come from keys.
None if the value cannot leave this
process, which is not a failure — nothing below it is cached either.Source§fn combine(&self, parts: &[&str]) -> Key
fn combine(&self, parts: &[&str]) -> Key
One key out of the ingredients of a recipe, in the order given. The
parts have to stay apart: run together,
["ab", "c"] and
["a", "bc"] would name the same thing.Auto Trait Implementations§
impl<'a> Freeze for Packing<'a>
impl<'a> !RefUnwindSafe for Packing<'a>
impl<'a> Send for Packing<'a>
impl<'a> Sync for Packing<'a>
impl<'a> Unpin for Packing<'a>
impl<'a> UnsafeUnpin for Packing<'a>
impl<'a> !UnwindSafe for Packing<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more