Struct ps_datachunk::encrypted::EncryptedDataChunk
source · pub struct EncryptedDataChunk {
pub chunk: OwnedDataChunk,
pub key: Arc<Hash>,
}
Expand description
represents an encrypted chunk of data and the key needed to decrypt it
Fields§
§chunk: OwnedDataChunk
§key: Arc<Hash>
Implementations§
source§impl EncryptedDataChunk
impl EncryptedDataChunk
sourcepub fn decrypt(&self, compressor: &Compressor) -> Result<OwnedDataChunk>
pub fn decrypt(&self, compressor: &Compressor) -> Result<OwnedDataChunk>
Decrypts this EncryptedDataChunk
.
Trait Implementations§
source§impl Clone for EncryptedDataChunk
impl Clone for EncryptedDataChunk
source§fn clone(&self) -> EncryptedDataChunk
fn clone(&self) -> EncryptedDataChunk
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl DataChunkTrait for EncryptedDataChunk
impl DataChunkTrait for EncryptedDataChunk
fn data_ref(&self) -> &[u8] ⓘ
fn hash_ref(&self) -> &[u8] ⓘ
fn hash(&self) -> HashCow<'_>
fn encrypt(&self, compressor: &Compressor) -> Result<EncryptedDataChunk>
fn decrypt(&self, key: &[u8], compressor: &Compressor) -> Result<OwnedDataChunk>
fn to_datachunk(&self) -> DataChunk<'_>
fn align(&self) -> AlignedDataChunk
fn borrow(&self) -> BorrowedDataChunk<'_>
fn to_owned(&self) -> OwnedDataChunk
fn try_as<T: Archive>(&self) -> Result<TypedDataChunk<'_, T>>
source§impl Debug for EncryptedDataChunk
impl Debug for EncryptedDataChunk
source§impl Hash for EncryptedDataChunk
impl Hash for EncryptedDataChunk
source§impl Ord for EncryptedDataChunk
impl Ord for EncryptedDataChunk
source§fn cmp(&self, other: &EncryptedDataChunk) -> Ordering
fn cmp(&self, other: &EncryptedDataChunk) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for EncryptedDataChunk
impl PartialEq for EncryptedDataChunk
source§fn eq(&self, other: &EncryptedDataChunk) -> bool
fn eq(&self, other: &EncryptedDataChunk) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for EncryptedDataChunk
impl PartialOrd for EncryptedDataChunk
source§fn partial_cmp(&self, other: &EncryptedDataChunk) -> Option<Ordering>
fn partial_cmp(&self, other: &EncryptedDataChunk) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for EncryptedDataChunk
impl StructuralPartialEq for EncryptedDataChunk
Auto Trait Implementations§
impl Freeze for EncryptedDataChunk
impl RefUnwindSafe for EncryptedDataChunk
impl Send for EncryptedDataChunk
impl Sync for EncryptedDataChunk
impl Unpin for EncryptedDataChunk
impl UnwindSafe for EncryptedDataChunk
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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> CallHasher for T
impl<T> CallHasher for T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.