pub enum DownloadStatus {
Waiting,
Active,
Paused,
Error(String),
Complete,
Removed,
}Expand description
Status of a download task.
Custom serde impl serializes every variant as a plain lowercase string
(e.g. “active”, “waiting”, “error”), matching C++ aria2’s wire format that
browser plugins expect. The Error(String) payload (error message) is not
emitted here; callers surface it via StatusInfo.error_message instead.
Variants§
Implementations§
Source§impl DownloadStatus
impl DownloadStatus
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
Whether a download currently owns an active execution slot.
is_active intentionally also includes Waiting for callers that
need the live, non-terminal task set. Runtime option compatibility
needs the narrower meaning used by aria2’s active request list.
pub fn is_active(&self) -> bool
pub fn is_completed(&self) -> bool
pub fn is_paused(&self) -> bool
pub fn is_stopped(&self) -> bool
pub fn as_str(&self) -> &'static str
Trait Implementations§
Source§impl Clone for DownloadStatus
impl Clone for DownloadStatus
Source§fn clone(&self) -> DownloadStatus
fn clone(&self) -> DownloadStatus
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DownloadStatus
impl Debug for DownloadStatus
Source§impl Default for DownloadStatus
impl Default for DownloadStatus
Source§fn default() -> DownloadStatus
fn default() -> DownloadStatus
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DownloadStatus
impl<'de> Deserialize<'de> for DownloadStatus
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for DownloadStatus
impl Display for DownloadStatus
impl Eq for DownloadStatus
Source§impl PartialEq for DownloadStatus
impl PartialEq for DownloadStatus
Source§impl Serialize for DownloadStatus
impl Serialize for DownloadStatus
impl StructuralPartialEq for DownloadStatus
Auto Trait Implementations§
impl Freeze for DownloadStatus
impl RefUnwindSafe for DownloadStatus
impl Send for DownloadStatus
impl Sync for DownloadStatus
impl Unpin for DownloadStatus
impl UnsafeUnpin for DownloadStatus
impl UnwindSafe for DownloadStatus
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.