pub struct EncryptedChunkRef { /* private fields */ }Expand description
An encrypted chunk reference: 32-byte address + 32-byte decryption key.
This type statically guarantees the reference is encrypted, eliminating runtime variant checks.
Implementations§
Source§impl EncryptedChunkRef
impl EncryptedChunkRef
Sourcepub const fn new(address: ChunkAddress, key: EncryptionKey) -> Self
pub const fn new(address: ChunkAddress, key: EncryptionKey) -> Self
Create a new encrypted chunk reference.
Sourcepub const fn address(&self) -> &ChunkAddress
pub const fn address(&self) -> &ChunkAddress
Chunk address (BMT hash of ciphertext).
Sourcepub const fn key(&self) -> &EncryptionKey
pub const fn key(&self) -> &EncryptionKey
Decryption key.
Sourcepub fn into_parts(self) -> (ChunkAddress, EncryptionKey)
pub fn into_parts(self) -> (ChunkAddress, EncryptionKey)
Consume and return (address, key).
Trait Implementations§
Source§impl Clone for EncryptedChunkRef
impl Clone for EncryptedChunkRef
Source§fn clone(&self) -> EncryptedChunkRef
fn clone(&self) -> EncryptedChunkRef
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EncryptedChunkRef
impl Debug for EncryptedChunkRef
impl Eq for EncryptedChunkRef
Source§impl From<&EncryptedChunkRef> for [u8; 64]
impl From<&EncryptedChunkRef> for [u8; 64]
Source§fn from(r: &EncryptedChunkRef) -> Self
fn from(r: &EncryptedChunkRef) -> Self
Converts to this type from the input type.
Source§impl From<&EncryptedChunkRef> for Vec<u8>
impl From<&EncryptedChunkRef> for Vec<u8>
Source§fn from(r: &EncryptedChunkRef) -> Self
fn from(r: &EncryptedChunkRef) -> Self
Converts to this type from the input type.
Source§impl From<EncryptedChunkRef> for [u8; 64]
impl From<EncryptedChunkRef> for [u8; 64]
Source§fn from(r: EncryptedChunkRef) -> Self
fn from(r: EncryptedChunkRef) -> Self
Converts to this type from the input type.
Source§impl From<EncryptedChunkRef> for EntryRef
Available on crate feature encryption only.
impl From<EncryptedChunkRef> for EntryRef
Available on crate feature
encryption only.Source§fn from(enc: EncryptedChunkRef) -> Self
fn from(enc: EncryptedChunkRef) -> Self
Converts to this type from the input type.
Source§impl JoinRef for EncryptedChunkRef
Available on crate feature encryption only.
impl JoinRef for EncryptedChunkRef
Available on crate feature
encryption only.Source§type Mode = EncryptedMode
type Mode = EncryptedMode
The join mode associated with this reference type.
Source§fn into_root_ref(self) -> Self
fn into_root_ref(self) -> Self
Convert into the root reference expected by the joiner.
Source§impl PartialEq for EncryptedChunkRef
impl PartialEq for EncryptedChunkRef
Source§fn eq(&self, other: &EncryptedChunkRef) -> bool
fn eq(&self, other: &EncryptedChunkRef) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for EncryptedChunkRef
Auto Trait Implementations§
impl Freeze for EncryptedChunkRef
impl RefUnwindSafe for EncryptedChunkRef
impl Send for EncryptedChunkRef
impl Sync for EncryptedChunkRef
impl Unpin for EncryptedChunkRef
impl UnsafeUnpin for EncryptedChunkRef
impl UnwindSafe for EncryptedChunkRef
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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