pub struct OptimizeStorage {
pub size: i64,
pub ttl: i32,
pub count: i32,
pub immunity_delay: i32,
pub file_types: Vec<FileType>,
pub chat_ids: Vec<i64>,
pub exclude_chat_ids: Vec<i64>,
pub chat_limit: i32,
}
Expand description
Optimizes storage usage, i.e. deletes some files and returns new storage usage statistics. Secret thumbnails can’t be deleted
Fields§
§size: i64
Limit on the total size of files after deletion. Pass -1 to use the default limit
ttl: i32
Limit on the time that has passed since the last time a file was accessed (or creation time for some filesystems). Pass -1 to use the default limit
count: i32
Limit on the total count of files after deletion. Pass -1 to use the default limit
immunity_delay: i32
The amount of time after the creation of a file during which it can’t be deleted, in seconds. Pass -1 to use the default value
file_types: Vec<FileType>
If not empty, only files with the given type(s) are considered. By default, all types except thumbnails, profile photos, stickers and wallpapers are deleted
chat_ids: Vec<i64>
If not empty, only files from the given chats are considered. Use 0 as chat identifier to delete files not belonging to any chat (e.g., profile photos)
exclude_chat_ids: Vec<i64>
If not empty, files from the given chats are excluded. Use 0 as chat identifier to exclude all files not belonging to any chat (e.g., profile photos)
chat_limit: i32
Same as in getStorageStatistics. Affects only returned statistics
Trait Implementations§
Source§impl Clone for OptimizeStorage
impl Clone for OptimizeStorage
Source§fn clone(&self) -> OptimizeStorage
fn clone(&self) -> OptimizeStorage
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more