mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 09:26:29 +03:00
Add missing documentation for the download state
This commit is contained in:
@@ -1,7 +1,5 @@
|
|||||||
//! # Download large messages manually.
|
//! # Download large messages manually.
|
||||||
|
|
||||||
#![allow(missing_docs)]
|
|
||||||
|
|
||||||
use anyhow::{anyhow, Result};
|
use anyhow::{anyhow, Result};
|
||||||
use deltachat_derive::{FromSql, ToSql};
|
use deltachat_derive::{FromSql, ToSql};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
@@ -33,6 +31,7 @@ const MIN_DOWNLOAD_LIMIT: u32 = 32768;
|
|||||||
/// `MIN_DELETE_SERVER_AFTER` increases the timeout in this case.
|
/// `MIN_DELETE_SERVER_AFTER` increases the timeout in this case.
|
||||||
pub(crate) const MIN_DELETE_SERVER_AFTER: i64 = 48 * 60 * 60;
|
pub(crate) const MIN_DELETE_SERVER_AFTER: i64 = 48 * 60 * 60;
|
||||||
|
|
||||||
|
/// Download state of the message.
|
||||||
#[derive(
|
#[derive(
|
||||||
Debug,
|
Debug,
|
||||||
Display,
|
Display,
|
||||||
@@ -49,9 +48,16 @@ pub(crate) const MIN_DELETE_SERVER_AFTER: i64 = 48 * 60 * 60;
|
|||||||
)]
|
)]
|
||||||
#[repr(u32)]
|
#[repr(u32)]
|
||||||
pub enum DownloadState {
|
pub enum DownloadState {
|
||||||
|
/// Message is fully downloaded.
|
||||||
Done = 0,
|
Done = 0,
|
||||||
|
|
||||||
|
/// Message is partially downloaded and can be fully downloaded at request.
|
||||||
Available = 10,
|
Available = 10,
|
||||||
|
|
||||||
|
/// Failed to fully download the message.
|
||||||
Failure = 20,
|
Failure = 20,
|
||||||
|
|
||||||
|
/// Full download of the message is in progress.
|
||||||
InProgress = 1000,
|
InProgress = 1000,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user