pub struct ThumbnailSettings {
pub dimensions: ImageDimensions,
pub method: Method,
pub animated: bool,
pub prefer_thumbnail: bool,
}
Expand description
The settings for downloading a thumbnail.
Fields§
§dimensions: ImageDimensions
The resquested dimensions of the thumbnail.
method: Method
The method to use to resize the thumbnail.
animated: bool
Whether to request an animated thumbnail.
prefer_thumbnail: bool
Whether we should prefer to get a thumbnail if dimensions are unknown.
This is particularly useful for avatars where we will prefer to save bandwidth and memory usage as we download a lot of them and they might appear several times on the screen. For media messages, we will on the contrary prefer to download the original content to reduce the space taken in the media cache.
Trait Implementations§
source§impl Clone for ThumbnailSettings
impl Clone for ThumbnailSettings
source§fn clone(&self) -> ThumbnailSettings
fn clone(&self) -> ThumbnailSettings
Returns a copy of the value. Read more
1.0.0 · 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 ThumbnailSettings
impl Debug for ThumbnailSettings
source§impl From<ThumbnailSettings> for MediaThumbnailSettings
impl From<ThumbnailSettings> for MediaThumbnailSettings
source§fn from(value: ThumbnailSettings) -> Self
fn from(value: ThumbnailSettings) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ThumbnailSettings
impl RefUnwindSafe for ThumbnailSettings
impl Send for ThumbnailSettings
impl Sync for ThumbnailSettings
impl Unpin for ThumbnailSettings
impl UnwindSafe for ThumbnailSettings
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,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more