pub struct KGet { /* private fields */ }Expand description
Main download client for the KGet library
Implementations§
Source§impl KGet
impl KGet
Sourcepub fn new() -> Result<Self, Box<dyn Error + Send + Sync>>
pub fn new() -> Result<Self, Box<dyn Error + Send + Sync>>
Create a new KGet client with default configuration
Sourcepub fn with_config(config: Config) -> Self
pub fn with_config(config: Config) -> Self
Create a new KGet client with custom configuration
Sourcepub fn download(
&self,
url: &str,
output_path: Option<String>,
quiet_mode: bool,
) -> Result<(), Box<dyn Error + Send + Sync>>
pub fn download( &self, url: &str, output_path: Option<String>, quiet_mode: bool, ) -> Result<(), Box<dyn Error + Send + Sync>>
Download a file from a URL to a local path
Sourcepub fn advanced_download(
&self,
url: &str,
output_path: Option<String>,
quiet_mode: bool,
) -> Result<(), Box<dyn Error + Send + Sync>>
pub fn advanced_download( &self, url: &str, output_path: Option<String>, quiet_mode: bool, ) -> Result<(), Box<dyn Error + Send + Sync>>
Advanced download with parallel chunks and resumable capability
Sourcepub fn get_config(&self) -> &Config
pub fn get_config(&self) -> &Config
Get current configuration
Sourcepub fn set_config(&mut self, config: Config)
pub fn set_config(&mut self, config: Config)
Update configuration
Auto Trait Implementations§
impl Freeze for KGet
impl RefUnwindSafe for KGet
impl Send for KGet
impl Sync for KGet
impl Unpin for KGet
impl UnwindSafe for KGet
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more