pub trait CiphertextSource:
Debug
+ Send
+ Sync {
// Required methods
fn size(&self) -> u64;
fn write_to(&self, writer: &mut dyn Write) -> Result<Hash32>;
}Expand description
Where an asset’s STREAM ciphertext comes from when it is written into an artifact.
A source, not a buffer: the export streams each original straight into the artifact’s
writer, so exporting holds one STREAM chunk of it rather than the whole library’s ciphertext.
The library’s sources re-derive the ciphertext from the plaintext on disk
(OriginalCiphertext); an in-memory Vec<u8> is a
source too, for callers that already hold the bytes.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".