pub struct PartFile { /* private fields */ }Implementations§
Source§impl PartFile
impl PartFile
pub fn open_or_create( target_path: &Path, url: &str, remote: &RemoteInfo, chunk_size: u64, hash: HashConfig, ) -> Result<Self>
pub const fn metadata(&self) -> &PartMetadata
pub fn incomplete_chunks(&self) -> Vec<u64>
pub fn write_chunk(&mut self, index: u64, bytes: &[u8]) -> Result<()>
pub fn write_chunk_bytes( &mut self, index: u64, chunk_offset: u64, bytes: &[u8], ) -> Result<()>
pub fn commit_chunk(&mut self, index: u64) -> Result<()>
pub fn finalize(self, target_path: &Path) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PartFile
impl RefUnwindSafe for PartFile
impl Send for PartFile
impl Sync for PartFile
impl Unpin for PartFile
impl UnsafeUnpin for PartFile
impl UnwindSafe for PartFile
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