pub enum DittoAttachmentFetchEvent {
    Completed {
        attachment: DittoAttachment,
    },
    Progress {
        downloaded_bytes: u64,
        total_bytes: u64,
    },
    Deleted,
}
Expand description

A representation of the events that can occur in relation to an attachment fetch.

There are three different attachment fetch events: Completed, Progress, or Deleted.

There will be at most one completed or deleted event per attachment fetch. There can be many progress events delivered for each attachment fetch.

Updates relating to an attachment fetch are delivered by registering a DittoAttachmentFetcher through a call to fetch_attachment

Variants

Completed

Fields

attachment: DittoAttachment

An attachment fetch event used when the attachment’s download has completed.

Progress

Fields

downloaded_bytes: u64
total_bytes: u64

An attachment fetch event used when the attachment’s download has progressed but is not yet complete.

Deleted

An attachment fetch event used when the attachment is deleted.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Applies the [Compat] adapter by value. Read more
Applies the [Compat] adapter by shared reference. Read more
Applies the [Compat] adapter by mutable reference. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Converts to T by calling Into<T>::into.
Tries to convert to T by calling TryInto<T>::try_into.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.