pub struct ZsyncAssembly { /* private fields */ }Implementations§
Source§impl ZsyncAssembly
impl ZsyncAssembly
pub fn new( control: ControlFile, output_path: &Path, ) -> Result<Self, AssemblyError>
pub fn with_base_url( control: ControlFile, output_path: &Path, base_url: Option<&str>, ) -> Result<Self, AssemblyError>
Sourcepub fn with_client(
control: ControlFile,
output_path: &Path,
base_url: Option<&str>,
http: HttpClient,
) -> Result<Self, AssemblyError>
pub fn with_client( control: ControlFile, output_path: &Path, base_url: Option<&str>, http: HttpClient, ) -> Result<Self, AssemblyError>
Assemble using a caller-supplied HTTP client.
The client carries the transport policy for every range request the assembly makes, so an embedder that needs its own TLS roots or that must refuse a redirect to plain HTTP can set it once here.
pub fn from_url( control_url: &str, output_path: &Path, ) -> Result<Self, AssemblyError>
Sourcepub fn from_url_with_client(
control_url: &str,
output_path: &Path,
http: HttpClient,
) -> Result<Self, AssemblyError>
pub fn from_url_with_client( control_url: &str, output_path: &Path, http: HttpClient, ) -> Result<Self, AssemblyError>
Fetch the control file and assemble, both using http.
The same client serves the control-file fetch and every subsequent range request, so one policy covers the whole transfer.
pub fn set_range_gap_threshold(&mut self, threshold: u64)
pub fn set_progress_callback<F>(&mut self, callback: F)
pub fn progress(&self) -> (u64, u64)
pub fn is_complete(&self) -> bool
pub fn block_stats(&self) -> (usize, usize)
pub fn submit_source_file( &mut self, path: &Path, ) -> Result<usize, AssemblyError>
pub fn submit_self_referential(&mut self) -> Result<usize, AssemblyError>
pub fn download_missing_blocks(&mut self) -> Result<usize, AssemblyError>
pub fn complete(self) -> Result<(), AssemblyError>
pub fn abort(self)
Auto Trait Implementations§
impl !RefUnwindSafe for ZsyncAssembly
impl !UnwindSafe for ZsyncAssembly
impl Freeze for ZsyncAssembly
impl Send for ZsyncAssembly
impl Sync for ZsyncAssembly
impl Unpin for ZsyncAssembly
impl UnsafeUnpin for ZsyncAssembly
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