pub struct DownloadConfig {
pub url: Url,
pub expected_hash: Option<[u8; 32]>,
pub max_size: Option<usize>,
pub disk_start_sector: u64,
pub sector_size: usize,
}Expand description
Configuration for ISO download.
Fields§
§url: UrlURL of ISO to download
expected_hash: Option<[u8; 32]>Expected SHA-256 hash (optional, for verification)
max_size: Option<usize>Maximum file size (bytes)
disk_start_sector: u64Target disk sector offset for writing
sector_size: usizeSector size (usually 512)
Implementations§
Source§impl DownloadConfig
impl DownloadConfig
Sourcepub fn with_max_size(self, max_size: usize) -> Self
pub fn with_max_size(self, max_size: usize) -> Self
Set maximum allowed file size.
Sourcepub fn with_disk_location(self, start_sector: u64, sector_size: usize) -> Self
pub fn with_disk_location(self, start_sector: u64, sector_size: usize) -> Self
Set target disk location.
Trait Implementations§
Source§impl Clone for DownloadConfig
impl Clone for DownloadConfig
Source§fn clone(&self) -> DownloadConfig
fn clone(&self) -> DownloadConfig
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DownloadConfig
impl RefUnwindSafe for DownloadConfig
impl Send for DownloadConfig
impl Sync for DownloadConfig
impl Unpin for DownloadConfig
impl UnwindSafe for DownloadConfig
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