pub struct PreparedUpload {
pub kind: MediaQuality,
pub aes_key: Vec<u8>,
pub file_key: String,
pub encrypted: Vec<u8>,
pub plaintext_bytes: u32,
pub md5: String,
pub sha256: String,
pub file_name: String,
pub destination: String,
}Fields§
§kind: MediaQuality§aes_key: Vec<u8>§file_key: String§encrypted: Vec<u8>§plaintext_bytes: u32§md5: String§sha256: String§file_name: String§destination: StringImplementations§
Source§impl PreparedUpload
impl PreparedUpload
Sourcepub fn prepare(
raw: &[u8],
kind: MediaQuality,
file_name: &str,
destination: &str,
) -> Result<Self>
pub fn prepare( raw: &[u8], kind: MediaQuality, file_name: &str, destination: &str, ) -> Result<Self>
Generate independent upload material. Persist either this result or the source bytes and its key/file-key before the first upload request.
Sourcepub fn with_material(
raw: &[u8],
kind: MediaQuality,
file_name: &str,
destination: &str,
key: &[u8],
file_key: &str,
) -> Result<Self>
pub fn with_material( raw: &[u8], kind: MediaQuality, file_name: &str, destination: &str, key: &[u8], file_key: &str, ) -> Result<Self>
Rebuild exactly the same encrypted upload from durable owned source bytes.
Trait Implementations§
Source§impl Clone for PreparedUpload
impl Clone for PreparedUpload
Source§impl Debug for PreparedUpload
impl Debug for PreparedUpload
Source§impl<'de> Deserialize<'de> for PreparedUpload
impl<'de> Deserialize<'de> for PreparedUpload
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 Drop for PreparedUpload
impl Drop for PreparedUpload
Auto Trait Implementations§
impl Freeze for PreparedUpload
impl RefUnwindSafe for PreparedUpload
impl Send for PreparedUpload
impl Sync for PreparedUpload
impl Unpin for PreparedUpload
impl UnsafeUnpin for PreparedUpload
impl UnwindSafe for PreparedUpload
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