pub struct FileChunk {
pub is_exist: bool,
pub file_name: String,
pub file_size: u128,
pub file_hash: String,
pub chunk_size: u128,
pub chunk_type: FileChunkType,
pub storage_path: String,
pub compress_active: bool,
pub result_obj: FileChunkSplitResult,
pub result_list: Vec<String>,
}
Fields§
§is_exist: bool
§file_name: String
§file_size: u128
§file_hash: String
§chunk_size: u128
§chunk_type: FileChunkType
§storage_path: String
§compress_active: bool
§result_obj: FileChunkSplitResult
§result_list: Vec<String>
Implementations§
Source§impl FileChunk
impl FileChunk
pub fn new() -> Self
pub fn set_compress(&mut self, active: bool)
pub fn set_storage_path_with_string(&mut self, storage_path: &str)
pub fn set_storage_path(&mut self, which_path: DefaultStoragePath)
pub fn assign_file(&mut self, file_path: &str)
pub fn set_size(&mut self, chunk_size: u128, chunk_type: FileChunkType)
pub fn split(&mut self) -> (bool, String)
pub fn result(&self) -> FileChunkSplitResult
pub fn merge(&self, info_file_path: &str) -> bool
Trait Implementations§
impl Eq for FileChunk
impl StructuralPartialEq for FileChunk
Auto Trait Implementations§
impl Freeze for FileChunk
impl RefUnwindSafe for FileChunk
impl Send for FileChunk
impl Sync for FileChunk
impl Unpin for FileChunk
impl UnwindSafe for FileChunk
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