pub struct DownloadCommand { /* private fields */ }Implementations§
Source§impl DownloadCommand
impl DownloadCommand
pub fn new( gid: GroupId, uri: &str, options: &DownloadOptions, output_dir: Option<&str>, output_name: Option<&str>, ) -> Result<Self>
pub fn new_with_group( group: Arc<RwLock<RequestGroup>>, uri: &str, options: &DownloadOptions, output_dir: Option<&str>, output_name: Option<&str>, ) -> Result<Self>
pub fn new_with_client( gid: GroupId, uri: &str, options: &DownloadOptions, output_dir: Option<&str>, output_name: Option<&str>, client: Arc<Client>, ) -> Result<Self>
pub fn new_with_group_and_client( group: Arc<RwLock<RequestGroup>>, uri: &str, options: &DownloadOptions, output_dir: Option<&str>, output_name: Option<&str>, client: Arc<Client>, ) -> Result<Self>
pub fn new_with_stat_man( gid: GroupId, uri: &str, options: &DownloadOptions, output_dir: Option<&str>, output_name: Option<&str>, stat_man: Arc<ServerStatMan>, ) -> Result<Self>
pub fn enable_perf_monitor(&mut self)
pub fn get_perf_metrics(&self) -> Metrics
pub fn get_perf_report(&self) -> Option<String>
pub fn get_perf_report_json(&self) -> Option<String>
pub async fn group(&self) -> RwLockReadGuard<'_, RequestGroup>
pub async fn group_mut(&self) -> RwLockWriteGuard<'_, RequestGroup>
pub fn no_proxy_matcher(&self) -> Option<&NoProxyMatcher>
Trait Implementations§
Source§impl Command for DownloadCommand
impl Command for DownloadCommand
fn execute<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn status(&self) -> CommandStatus
fn timeout(&self) -> Option<Duration>
Source§fn started_at(&self) -> Option<Instant>
fn started_at(&self) -> Option<Instant>
Returns the instant at which this command started executing, if the
engine has informed the command via [
set_started_at]. Read moreSource§fn set_started_at(&mut self, _instant: Instant)
fn set_started_at(&mut self, _instant: Instant)
Called by the engine immediately before the command is spawned onto a
background task. The default implementation is a no-op; commands that
store the instant can expose it through [
started_at].Auto Trait Implementations§
impl !RefUnwindSafe for DownloadCommand
impl !UnwindSafe for DownloadCommand
impl Freeze for DownloadCommand
impl Send for DownloadCommand
impl Sync for DownloadCommand
impl Unpin for DownloadCommand
impl UnsafeUnpin for DownloadCommand
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