Struct dittolive_ditto::store::attachment::fetcher::DittoAttachmentFetcher
source · pub struct DittoAttachmentFetcher<'a, Version: Sealed = V1> { /* private fields */ }
Expand description
The output of store.fetch_attachment()
.
-
In the deprecated
FetcherVersion::V1
case, they must be kept alive for the fetching of the attachment to proceed and for you to be notified once the status of the fetch request has changed. -
In the proper
FetcherVersion::V2
case, they are only.cancel()
-ed explicitly, that is, they are safe to discard / not to safe-keep.
Implementations§
source§impl DittoAttachmentFetcher<'static, V2>
impl DittoAttachmentFetcher<'static, V2>
sourcepub fn cancel(&self)
pub fn cancel(&self)
Stops fetching the fetcher’s associated attachment and cleans up any associated resources.
Note that you are not required to call it once your attachment fetch operation has finished. The method primarily exists to allow you to cancel an attachment fetch request while it is ongoing if you no longer wish for the attachment to be made available locally to the device nor for its evolution to be observed.