pub struct CompressedKVStore<Key, Value> { /* private fields */ }Expand description
Compressed KVStore
This type is the serializable and deserializable form of a KVStore
Implementations§
Source§impl<Key, Value> CompressedKVStore<Key, Value>where
Value: Expandable + IntegerRadixCiphertext,
impl<Key, Value> CompressedKVStore<Key, Value>where
Value: Expandable + IntegerRadixCiphertext,
Sourcepub fn decompress(
&self,
decompression_key: &DecompressionKey,
) -> Result<KVStore<Key, Value>>
pub fn decompress( &self, decompression_key: &DecompressionKey, ) -> Result<KVStore<Key, Value>>
Decompressed the KVStore
Returns an error if:
- The requested value type does not have the same signedness as the stored one
- A key does not have a corresponding value
- A value (which is a radix ciphertext) does not have the same number of blocks as the others.
Both these errors indicate corrupted or malformed data
Trait Implementations§
Source§impl<'de, Key, Value> Deserialize<'de> for CompressedKVStore<Key, Value>where
Key: Deserialize<'de>,
impl<'de, Key, Value> Deserialize<'de> for CompressedKVStore<Key, Value>where
Key: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Named for CompressedKVStore<i128, RadixCiphertext>
impl Named for CompressedKVStore<i128, RadixCiphertext>
Source§const NAME: &'static str = "integer::CompressedKVStore<i128, integer::RadixCiphertext>"
const NAME: &'static str = "integer::CompressedKVStore<i128, integer::RadixCiphertext>"
Default name for the type
Source§const BACKWARD_COMPATIBILITY_ALIASES: &'static [&'static str] = _
const BACKWARD_COMPATIBILITY_ALIASES: &'static [&'static str] = _
Aliases that should also be accepted for backward compatibility when checking the name of
values of this type
Source§impl Named for CompressedKVStore<i128, SignedRadixCiphertext>
impl Named for CompressedKVStore<i128, SignedRadixCiphertext>
Source§const NAME: &'static str = "integer::CompressedKVStore<i128, integer::SignedRadixCiphertext>"
const NAME: &'static str = "integer::CompressedKVStore<i128, integer::SignedRadixCiphertext>"
Default name for the type
Source§const BACKWARD_COMPATIBILITY_ALIASES: &'static [&'static str] = _
const BACKWARD_COMPATIBILITY_ALIASES: &'static [&'static str] = _
Aliases that should also be accepted for backward compatibility when checking the name of
values of this type
Source§impl Named for CompressedKVStore<i16, RadixCiphertext>
impl Named for CompressedKVStore<i16, RadixCiphertext>
Source§impl Named for CompressedKVStore<i16, SignedRadixCiphertext>
impl Named for CompressedKVStore<i16, SignedRadixCiphertext>
Source§const NAME: &'static str = "integer::CompressedKVStore<i16, integer::SignedRadixCiphertext>"
const NAME: &'static str = "integer::CompressedKVStore<i16, integer::SignedRadixCiphertext>"
Default name for the type
Source§const BACKWARD_COMPATIBILITY_ALIASES: &'static [&'static str] = _
const BACKWARD_COMPATIBILITY_ALIASES: &'static [&'static str] = _
Aliases that should also be accepted for backward compatibility when checking the name of
values of this type
Source§impl Named for CompressedKVStore<i32, RadixCiphertext>
impl Named for CompressedKVStore<i32, RadixCiphertext>
Source§impl Named for CompressedKVStore<i32, SignedRadixCiphertext>
impl Named for CompressedKVStore<i32, SignedRadixCiphertext>
Source§const NAME: &'static str = "integer::CompressedKVStore<i32, integer::SignedRadixCiphertext>"
const NAME: &'static str = "integer::CompressedKVStore<i32, integer::SignedRadixCiphertext>"
Default name for the type
Source§const BACKWARD_COMPATIBILITY_ALIASES: &'static [&'static str] = _
const BACKWARD_COMPATIBILITY_ALIASES: &'static [&'static str] = _
Aliases that should also be accepted for backward compatibility when checking the name of
values of this type
Source§impl Named for CompressedKVStore<i64, RadixCiphertext>
impl Named for CompressedKVStore<i64, RadixCiphertext>
Source§impl Named for CompressedKVStore<i64, SignedRadixCiphertext>
impl Named for CompressedKVStore<i64, SignedRadixCiphertext>
Source§const NAME: &'static str = "integer::CompressedKVStore<i64, integer::SignedRadixCiphertext>"
const NAME: &'static str = "integer::CompressedKVStore<i64, integer::SignedRadixCiphertext>"
Default name for the type
Source§const BACKWARD_COMPATIBILITY_ALIASES: &'static [&'static str] = _
const BACKWARD_COMPATIBILITY_ALIASES: &'static [&'static str] = _
Aliases that should also be accepted for backward compatibility when checking the name of
values of this type
Source§impl Named for CompressedKVStore<i8, RadixCiphertext>
impl Named for CompressedKVStore<i8, RadixCiphertext>
Source§impl Named for CompressedKVStore<i8, SignedRadixCiphertext>
impl Named for CompressedKVStore<i8, SignedRadixCiphertext>
Source§const NAME: &'static str = "integer::CompressedKVStore<i8, integer::SignedRadixCiphertext>"
const NAME: &'static str = "integer::CompressedKVStore<i8, integer::SignedRadixCiphertext>"
Default name for the type
Source§const BACKWARD_COMPATIBILITY_ALIASES: &'static [&'static str] = _
const BACKWARD_COMPATIBILITY_ALIASES: &'static [&'static str] = _
Aliases that should also be accepted for backward compatibility when checking the name of
values of this type
Source§impl Named for CompressedKVStore<u128, RadixCiphertext>
impl Named for CompressedKVStore<u128, RadixCiphertext>
Source§const NAME: &'static str = "integer::CompressedKVStore<u128, integer::RadixCiphertext>"
const NAME: &'static str = "integer::CompressedKVStore<u128, integer::RadixCiphertext>"
Default name for the type
Source§const BACKWARD_COMPATIBILITY_ALIASES: &'static [&'static str] = _
const BACKWARD_COMPATIBILITY_ALIASES: &'static [&'static str] = _
Aliases that should also be accepted for backward compatibility when checking the name of
values of this type
Source§impl Named for CompressedKVStore<u128, SignedRadixCiphertext>
impl Named for CompressedKVStore<u128, SignedRadixCiphertext>
Source§const NAME: &'static str = "integer::CompressedKVStore<u128, integer::SignedRadixCiphertext>"
const NAME: &'static str = "integer::CompressedKVStore<u128, integer::SignedRadixCiphertext>"
Default name for the type
Source§const BACKWARD_COMPATIBILITY_ALIASES: &'static [&'static str] = _
const BACKWARD_COMPATIBILITY_ALIASES: &'static [&'static str] = _
Aliases that should also be accepted for backward compatibility when checking the name of
values of this type
Source§impl Named for CompressedKVStore<u16, RadixCiphertext>
impl Named for CompressedKVStore<u16, RadixCiphertext>
Source§impl Named for CompressedKVStore<u16, SignedRadixCiphertext>
impl Named for CompressedKVStore<u16, SignedRadixCiphertext>
Source§const NAME: &'static str = "integer::CompressedKVStore<u16, integer::SignedRadixCiphertext>"
const NAME: &'static str = "integer::CompressedKVStore<u16, integer::SignedRadixCiphertext>"
Default name for the type
Source§const BACKWARD_COMPATIBILITY_ALIASES: &'static [&'static str] = _
const BACKWARD_COMPATIBILITY_ALIASES: &'static [&'static str] = _
Aliases that should also be accepted for backward compatibility when checking the name of
values of this type
Source§impl Named for CompressedKVStore<u32, RadixCiphertext>
impl Named for CompressedKVStore<u32, RadixCiphertext>
Source§impl Named for CompressedKVStore<u32, SignedRadixCiphertext>
impl Named for CompressedKVStore<u32, SignedRadixCiphertext>
Source§const NAME: &'static str = "integer::CompressedKVStore<u32, integer::SignedRadixCiphertext>"
const NAME: &'static str = "integer::CompressedKVStore<u32, integer::SignedRadixCiphertext>"
Default name for the type
Source§const BACKWARD_COMPATIBILITY_ALIASES: &'static [&'static str] = _
const BACKWARD_COMPATIBILITY_ALIASES: &'static [&'static str] = _
Aliases that should also be accepted for backward compatibility when checking the name of
values of this type
Source§impl Named for CompressedKVStore<u64, RadixCiphertext>
impl Named for CompressedKVStore<u64, RadixCiphertext>
Source§impl Named for CompressedKVStore<u64, SignedRadixCiphertext>
impl Named for CompressedKVStore<u64, SignedRadixCiphertext>
Source§const NAME: &'static str = "integer::CompressedKVStore<u64, integer::SignedRadixCiphertext>"
const NAME: &'static str = "integer::CompressedKVStore<u64, integer::SignedRadixCiphertext>"
Default name for the type
Source§const BACKWARD_COMPATIBILITY_ALIASES: &'static [&'static str] = _
const BACKWARD_COMPATIBILITY_ALIASES: &'static [&'static str] = _
Aliases that should also be accepted for backward compatibility when checking the name of
values of this type
Source§impl Named for CompressedKVStore<u8, RadixCiphertext>
impl Named for CompressedKVStore<u8, RadixCiphertext>
Source§impl Named for CompressedKVStore<u8, SignedRadixCiphertext>
impl Named for CompressedKVStore<u8, SignedRadixCiphertext>
Source§const NAME: &'static str = "integer::CompressedKVStore<u8, integer::SignedRadixCiphertext>"
const NAME: &'static str = "integer::CompressedKVStore<u8, integer::SignedRadixCiphertext>"
Default name for the type
Source§const BACKWARD_COMPATIBILITY_ALIASES: &'static [&'static str] = _
const BACKWARD_COMPATIBILITY_ALIASES: &'static [&'static str] = _
Aliases that should also be accepted for backward compatibility when checking the name of
values of this type
Source§impl<Key, Value> Serialize for CompressedKVStore<Key, Value>where
Key: Serialize,
impl<Key, Value> Serialize for CompressedKVStore<Key, Value>where
Key: Serialize,
Source§impl<Key, Value> Unversionize for CompressedKVStore<Key, Value>where
CompressedKVStoreVersions<Key, Value>: VersionsDispatch<Self>,
impl<Key, Value> Unversionize for CompressedKVStore<Key, Value>where
CompressedKVStoreVersions<Key, Value>: VersionsDispatch<Self>,
Source§fn unversionize(
versioned: Self::VersionedOwned,
) -> Result<Self, UnversionizeError>
fn unversionize( versioned: Self::VersionedOwned, ) -> Result<Self, UnversionizeError>
Creates an object from a versioned enum, and eventually upgrades from previous
variants.
Source§impl<Key, Value> UnversionizeVec for CompressedKVStore<Key, Value>where
CompressedKVStoreVersions<Key, Value>: VersionsDispatch<Self>,
impl<Key, Value> UnversionizeVec for CompressedKVStore<Key, Value>where
CompressedKVStoreVersions<Key, Value>: VersionsDispatch<Self>,
fn unversionize_vec( versioned: Self::VersionedVec, ) -> Result<Vec<Self>, UnversionizeError>
Source§impl<Key, Value> Version for CompressedKVStore<Key, Value>where
Vec<Key>: VersionizeOwned + Unversionize + Versionize,
CompressedCiphertextList: VersionizeOwned + Unversionize + Versionize,
bool: VersionizeOwned + Unversionize + Versionize,
PhantomData<Value>: VersionizeOwned + Unversionize + Versionize,
impl<Key, Value> Version for CompressedKVStore<Key, Value>where
Vec<Key>: VersionizeOwned + Unversionize + Versionize,
CompressedCiphertextList: VersionizeOwned + Unversionize + Versionize,
bool: VersionizeOwned + Unversionize + Versionize,
PhantomData<Value>: VersionizeOwned + Unversionize + Versionize,
Source§impl<Key, Value> Versionize for CompressedKVStore<Key, Value>where
CompressedKVStoreVersions<Key, Value>: VersionsDispatch<Self>,
impl<Key, Value> Versionize for CompressedKVStore<Key, Value>where
CompressedKVStoreVersions<Key, Value>: VersionsDispatch<Self>,
Source§type Versioned<'vers> = <CompressedKVStoreVersions<Key, Value> as VersionsDispatch<CompressedKVStore<Key, Value>>>::Ref<'vers>
where
Key: 'vers,
Value: 'vers
type Versioned<'vers> = <CompressedKVStoreVersions<Key, Value> as VersionsDispatch<CompressedKVStore<Key, Value>>>::Ref<'vers> where Key: 'vers, Value: 'vers
The equivalent versioned type. It should have a variant for each version.
It may own the underlying data or only hold a read-only reference to it.
Source§fn versionize(&self) -> Self::Versioned<'_>
fn versionize(&self) -> Self::Versioned<'_>
Wraps the object into a versioned enum with a variant for each version. This will
use references on the underlying types if possible.
Source§impl<Key, Value> VersionizeOwned for CompressedKVStore<Key, Value>where
CompressedKVStoreVersions<Key, Value>: VersionsDispatch<Self>,
impl<Key, Value> VersionizeOwned for CompressedKVStore<Key, Value>where
CompressedKVStoreVersions<Key, Value>: VersionsDispatch<Self>,
type VersionedOwned = <CompressedKVStoreVersions<Key, Value> as VersionsDispatch<CompressedKVStore<Key, Value>>>::Owned
Source§fn versionize_owned(self) -> Self::VersionedOwned
fn versionize_owned(self) -> Self::VersionedOwned
Wraps the object into a versioned enum with a variant for each version. This will
clone the underlying types.
Source§impl<Key, Value> VersionizeSlice for CompressedKVStore<Key, Value>where
CompressedKVStoreVersions<Key, Value>: VersionsDispatch<Self>,
impl<Key, Value> VersionizeSlice for CompressedKVStore<Key, Value>where
CompressedKVStoreVersions<Key, Value>: VersionsDispatch<Self>,
type VersionedSlice<'vers> = Vec<<CompressedKVStore<Key, Value> as Versionize>::Versioned<'vers>> where Key: 'vers, Value: 'vers
fn versionize_slice(slice: &[Self]) -> Self::VersionedSlice<'_>
Source§impl<Key, Value> VersionizeVec for CompressedKVStore<Key, Value>where
CompressedKVStoreVersions<Key, Value>: VersionsDispatch<Self>,
impl<Key, Value> VersionizeVec for CompressedKVStore<Key, Value>where
CompressedKVStoreVersions<Key, Value>: VersionsDispatch<Self>,
type VersionedVec = Vec<<CompressedKVStore<Key, Value> as VersionizeOwned>::VersionedOwned>
fn versionize_vec(vec: Vec<Self>) -> Self::VersionedVec
Source§impl<K, V> VersionsDispatch<CompressedKVStore<K, V>> for CompressedKVStoreVersions<K, V>where
CompressedKVStore<K, V>: Version,
impl<K, V> VersionsDispatch<CompressedKVStore<K, V>> for CompressedKVStoreVersions<K, V>where
CompressedKVStore<K, V>: Version,
Auto Trait Implementations§
impl<Key, Value> Freeze for CompressedKVStore<Key, Value>
impl<Key, Value> RefUnwindSafe for CompressedKVStore<Key, Value>where
Value: RefUnwindSafe,
Key: RefUnwindSafe,
impl<Key, Value> Send for CompressedKVStore<Key, Value>
impl<Key, Value> Sync for CompressedKVStore<Key, Value>
impl<Key, Value> Unpin for CompressedKVStore<Key, Value>
impl<Key, Value> UnwindSafe for CompressedKVStore<Key, Value>where
Value: UnwindSafe,
Key: UnwindSafe,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more