pub struct DownloadManagerConfig {
pub models_directory: PathBuf,
pub max_concurrent: u32,
pub max_queue_size: u32,
pub hf_token: Option<String>,
}Expand description
Configuration for creating a download manager.
Contains paths and limits that the download manager needs. Infrastructure-specific options are handled internally.
Fields§
§models_directory: PathBufDirectory where models are stored.
max_concurrent: u32Maximum concurrent downloads.
max_queue_size: u32Maximum queue size.
hf_token: Option<String>HuggingFace authentication token (for private repos).
Implementations§
Source§impl DownloadManagerConfig
impl DownloadManagerConfig
Sourcepub const fn with_max_concurrent(self, max: u32) -> Self
pub const fn with_max_concurrent(self, max: u32) -> Self
Set the maximum concurrent downloads.
Sourcepub const fn with_max_queue_size(self, max: u32) -> Self
pub const fn with_max_queue_size(self, max: u32) -> Self
Set the maximum queue size.
Sourcepub fn with_hf_token(self, token: Option<String>) -> Self
pub fn with_hf_token(self, token: Option<String>) -> Self
Set the HuggingFace token.
Trait Implementations§
Source§impl Clone for DownloadManagerConfig
impl Clone for DownloadManagerConfig
Source§fn clone(&self) -> DownloadManagerConfig
fn clone(&self) -> DownloadManagerConfig
Returns a duplicate 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 moreSource§impl Debug for DownloadManagerConfig
impl Debug for DownloadManagerConfig
Auto Trait Implementations§
impl Freeze for DownloadManagerConfig
impl RefUnwindSafe for DownloadManagerConfig
impl Send for DownloadManagerConfig
impl Sync for DownloadManagerConfig
impl Unpin for DownloadManagerConfig
impl UnwindSafe for DownloadManagerConfig
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