pub struct WebP(/* private fields */);Available on crate features
image and image-format-webp only.Expand description
An image in WebP format.
Trait Implementations§
Source§impl ImgFormat for WebP
impl ImgFormat for WebP
Source§const FORMAT: ImageFormat = image::ImageFormat::WebP
const FORMAT: ImageFormat = image::ImageFormat::WebP
The image format.
Source§type WriterType<'a, Vfs> = WebPWriter<'a, Vfs>
where
Vfs: 'a
type WriterType<'a, Vfs> = WebPWriter<'a, Vfs> where Vfs: 'a
The writer type for this image format.
Source§fn from_image(img: DynamicImage) -> Self
fn from_image(img: DynamicImage) -> Self
Create an instance of this type from a
image::DynamicImage.Source§fn as_image(&self) -> &DynamicImage
fn as_image(&self) -> &DynamicImage
Get a reference to the inner
image::DynamicImage.Source§fn into_image(self) -> DynamicImage
fn into_image(self) -> DynamicImage
Consumes this instance and returns the inner
image::DynamicImage.impl StructuralPartialEq for WebP
Auto Trait Implementations§
impl Freeze for WebP
impl RefUnwindSafe for WebP
impl Send for WebP
impl Sync for WebP
impl Unpin for WebP
impl UnwindSafe for WebP
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§impl<T> DirStructureItem for T
impl<T> DirStructureItem for T
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 moreSource§impl<T> NewtypeToInner for Twhere
T: ImgFormat,
impl<T> NewtypeToInner for Twhere
T: ImgFormat,
Source§type Inner = DynamicImage
type Inner = DynamicImage
The inner type.
Source§fn into_inner(self) -> <T as NewtypeToInner>::Inner
fn into_inner(self) -> <T as NewtypeToInner>::Inner
Converts the newtype to its inner type.
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<'vfs, Vfs, T> ReadFromAsync<'vfs, Vfs> for T
impl<'vfs, Vfs, T> ReadFromAsync<'vfs, Vfs> for T
Source§type Future = <Vfs as ReadImageFromAsync<T>>::ReadImageFuture<'vfs>
type Future = <Vfs as ReadImageFromAsync<T>>::ReadImageFuture<'vfs>
Available on crate feature
async only.The future type returned by the async read function.
Source§impl<'vfs, Vfs, P, T> WriteToAsync<'vfs, Vfs> for Twhere
Vfs: VfsAsyncWithSeekWrite<Path = P> + 'vfs,
P: PathType + 'vfs + ?Sized,
T: ImgFormat,
<Vfs as WriteSupportingVfsAsync>::WFile: AsyncSeek,
(DynamicImage, ImageFormat): WriteToAsync<'vfs, Vfs>,
impl<'vfs, Vfs, P, T> WriteToAsync<'vfs, Vfs> for Twhere
Vfs: VfsAsyncWithSeekWrite<Path = P> + 'vfs,
P: PathType + 'vfs + ?Sized,
T: ImgFormat,
<Vfs as WriteSupportingVfsAsync>::WFile: AsyncSeek,
(DynamicImage, ImageFormat): WriteToAsync<'vfs, Vfs>,
Source§type Future = <(DynamicImage, ImageFormat) as WriteToAsync<'vfs, Vfs>>::Future
type Future = <(DynamicImage, ImageFormat) as WriteToAsync<'vfs, Vfs>>::Future
Available on crate feature
async only.The future type returned by the async write function.
Source§fn write_to_async(
self,
path: <P as PathType>::OwnedPath,
vfs: Pin<&'vfs Vfs>,
) -> <T as WriteToAsync<'vfs, Vfs>>::Future
fn write_to_async( self, path: <P as PathType>::OwnedPath, vfs: Pin<&'vfs Vfs>, ) -> <T as WriteToAsync<'vfs, Vfs>>::Future
Available on crate feature
async only.Asynchronously writes the structure to the specified path.
Source§impl<'vfs, Vfs, P, T> WriteToAsyncRef<'vfs, Vfs> for Twhere
Vfs: VfsAsyncWithSeekWrite<Path = P> + 'vfs,
P: PathType + 'vfs + ?Sized,
T: ImgFormat,
<Vfs as WriteSupportingVfsAsync>::WFile: AsyncSeek,
(&'a DynamicImage, ImageFormat): for<'a> WriteToAsync<'a, Vfs>,
impl<'vfs, Vfs, P, T> WriteToAsyncRef<'vfs, Vfs> for Twhere
Vfs: VfsAsyncWithSeekWrite<Path = P> + 'vfs,
P: PathType + 'vfs + ?Sized,
T: ImgFormat,
<Vfs as WriteSupportingVfsAsync>::WFile: AsyncSeek,
(&'a DynamicImage, ImageFormat): for<'a> WriteToAsync<'a, Vfs>,
Source§type Future<'a> = <(&'a DynamicImage, ImageFormat) as WriteToAsync<'a, Vfs>>::Future
where
'vfs: 'a,
T: 'a,
Vfs: 'a
type Future<'a> = <(&'a DynamicImage, ImageFormat) as WriteToAsync<'a, Vfs>>::Future where 'vfs: 'a, T: 'a, Vfs: 'a
Available on crate feature
async only.The future type returned by the async write function.
Source§fn write_to_async_ref<'a>(
&'a self,
path: <P as PathType>::OwnedPath,
vfs: Pin<&'a Vfs>,
) -> <T as WriteToAsyncRef<'vfs, Vfs>>::Future<'a>where
'vfs: 'a,
fn write_to_async_ref<'a>(
&'a self,
path: <P as PathType>::OwnedPath,
vfs: Pin<&'a Vfs>,
) -> <T as WriteToAsyncRef<'vfs, Vfs>>::Future<'a>where
'vfs: 'a,
Available on crate feature
async only.Asynchronously writes the structure to the specified path.