pub struct EncryptedChunk(/* private fields */);Expand description
A JavaScript wrapper for the EncryptedChunk struct.
EncryptedChunk represents an encrypted piece of data along with its metadata like size and hash. Chunks are stored separately and referenced by the DataMap.
Implementations§
Source§impl EncryptedChunk
impl EncryptedChunk
pub fn into_reference( val: EncryptedChunk, env: Env, ) -> Result<Reference<EncryptedChunk>>
pub fn into_instance(self, env: Env) -> Result<ClassInstance<EncryptedChunk>>
Source§impl EncryptedChunk
impl EncryptedChunk
Sourcepub fn content_size(&self) -> u32
pub fn content_size(&self) -> u32
Get the size of the original content before encryption.
Sourcepub fn hash(&self) -> Uint8Array
pub fn hash(&self) -> Uint8Array
Get the hash of the encrypted chunk.
Sourcepub fn content(&self) -> Uint8Array
pub fn content(&self) -> Uint8Array
Get the content of the encrypted chunk.
Trait Implementations§
Source§impl Clone for EncryptedChunk
impl Clone for EncryptedChunk
Source§fn clone(&self) -> EncryptedChunk
fn clone(&self) -> EncryptedChunk
Returns a duplicate 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 FromNapiMutRef for EncryptedChunk
impl FromNapiMutRef for EncryptedChunk
Source§unsafe fn from_napi_mut_ref(
env: napi_env,
napi_val: napi_value,
) -> Result<&'static mut Self>
unsafe fn from_napi_mut_ref( env: napi_env, napi_val: napi_value, ) -> Result<&'static mut Self>
Safety Read more
Source§impl FromNapiRef for EncryptedChunk
impl FromNapiRef for EncryptedChunk
Source§unsafe fn from_napi_ref(
env: napi_env,
napi_val: napi_value,
) -> Result<&'static Self>
unsafe fn from_napi_ref( env: napi_env, napi_val: napi_value, ) -> Result<&'static Self>
Safety Read more
Source§impl FromNapiValue for &EncryptedChunk
impl FromNapiValue for &EncryptedChunk
Source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self, Error>
Source§impl FromNapiValue for &mut EncryptedChunk
impl FromNapiValue for &mut EncryptedChunk
Source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self, Error>
Source§impl ObjectFinalize for EncryptedChunk
impl ObjectFinalize for EncryptedChunk
Source§impl ToNapiValue for EncryptedChunk
impl ToNapiValue for EncryptedChunk
Source§unsafe fn to_napi_value(
env: napi_env,
val: EncryptedChunk,
) -> Result<napi_value>
unsafe fn to_napi_value( env: napi_env, val: EncryptedChunk, ) -> Result<napi_value>
Safety Read more
Source§impl TypeName for &EncryptedChunk
impl TypeName for &EncryptedChunk
Source§impl TypeName for &mut EncryptedChunk
impl TypeName for &mut EncryptedChunk
Source§impl TypeName for EncryptedChunk
impl TypeName for EncryptedChunk
Source§impl ValidateNapiValue for &EncryptedChunk
impl ValidateNapiValue for &EncryptedChunk
Source§unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
Safety Read more
Source§impl ValidateNapiValue for &mut EncryptedChunk
impl ValidateNapiValue for &mut EncryptedChunk
Source§unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
Safety Read more
Auto Trait Implementations§
impl !Freeze for EncryptedChunk
impl RefUnwindSafe for EncryptedChunk
impl Send for EncryptedChunk
impl Sync for EncryptedChunk
impl Unpin for EncryptedChunk
impl UnwindSafe for EncryptedChunk
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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