跳到主要内容

ImageFormat

搜索

Enum ImageFormat 

源代码
pub enum ImageFormat {
    Jpeg,
    Png,
    Gif,
    Tiff,
    Bmp,
    JpegXr,
}
展开描述

crate::encoder::ImageEncoder 所支持的输出图像格式。

变体§

§

Jpeg

JPEG(有损)。

§

Png

PNG(无损)。

§

Gif

GIF(基于调色板)。

§

Tiff

TIFF(标记图像文件格式)。

§

Bmp

BMP(位图)。

§

JpegXr

JPEG XR(HD 照片)。

Trait 实现§

源代码§

impl Clone for ImageFormat

源代码§

fn clone(&self) -> ImageFormat

返回值的副本。 阅读更多
1.0.0 · 源代码§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. 阅读更多
源代码§

impl Debug for ImageFormat

源代码§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

使用给定的格式化器格式化值。阅读更多
源代码§

impl PartialEq for ImageFormat

源代码§

fn eq(&self, other: &ImageFormat) -> bool

测试 selfother 值是否相等,由 == 使用。
1.0.0 · 源代码§

fn ne(&self, other: &Rhs) -> bool

测试 !=。默认实现几乎总是足够的,除非有非常充分的理由,否则不应被覆盖。
源代码§

impl Copy for ImageFormat

源代码§

impl Eq for ImageFormat

源代码§

impl StructuralPartialEq for ImageFormat

自动 Trait 实现§

通用实现§

源代码§

impl<T> Any for T
where T: 'static + ?Sized,

源代码§

fn type_id(&self) -> TypeId

获取 selfTypeId阅读更多
源代码§

impl<T> Borrow<T> for T
where T: ?Sized,

源代码§

fn borrow(&self) -> &T

从拥有的值不可变地借用。阅读更多
源代码§

impl<T> BorrowMut<T> for T
where T: ?Sized,

源代码§

fn borrow_mut(&mut self) -> &mut T

从拥有的值可变地借用。阅读更多
源代码§

impl<T> CloneToUninit for T
where T: Clone,

源代码§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬这是 nightly-only 实验性 API。(clone_to_uninit)
Performs copy-assignment from self to dest. 阅读更多
源代码§

impl<T> From<T> for T

源代码§

fn from(t: T) -> T

原样返回参数。

源代码§

impl<T, U> Into<U> for T
where U: From<T>,

源代码§

fn into(self) -> U

调用 U::from(self)

也就是说,此转换由 From<T> for U 的实现决定。

源代码§

impl<T> IntoEither for T

源代码§

fn into_either(self, into_left: bool) -> Either<Self, Self>

self 转换为 Left 变体,如果 Either<Self, Self>into_left is true. Converts self into a Right 变体,如果 Either<Self, Self> 否则。 阅读更多
源代码§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

self 转换为 Left 变体,如果 Either<Self, Self>into_left(&self) returns true. Converts self into a Right 变体,如果 Either<Self, Self> 否则。 阅读更多
源代码§

impl<T> Pointable for T

源代码§

const ALIGN: usize

指针的对齐方式。
源代码§

type Init = T

初始化器的类型。
源代码§

unsafe fn init(init: <T as Pointable>::Init) -> usize

使用给定的初始化器初始化 a。阅读更多
源代码§

unsafe fn deref<'a>(ptr: usize) -> &'a T

解引用给定的指针。阅读更多
源代码§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

可变地解引用给定的指针。阅读更多
源代码§

unsafe fn drop(ptr: usize)

释放在给定指针处指向的对象。阅读更多
源代码§

impl<T> ToOwned for T
where T: Clone,

源代码§

type Owned = T

获取所有权后的结果类型。
源代码§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. 阅读更多
源代码§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 阅读更多
源代码§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

源代码§

type Error = Infallible

转换失败时返回的类型。
源代码§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

执行此转换。
源代码§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

源代码§

type Error = <U as TryFrom<T>>::Error

转换失败时返回的类型。
源代码§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

执行此转换。