Struct sic_io::format::JPEGQuality[][src]

pub struct JPEGQuality { /* fields omitted */ }

This struct ensures no invalid JPEG qualities can be stored. Using this struct instead of u8 directly should ensure no panics occur because of invalid quality values.

Implementations

impl JPEGQuality[src]

pub fn try_from(quality: u8) -> Result<Self, SicIoError>[src]

Returns an Ok result if the quality requested is between 1 and 100 (inclusive).

pub fn as_u8(self) -> u8[src]

Return the valid quality value.

Trait Implementations

impl Clone for JPEGQuality[src]

impl Copy for JPEGQuality[src]

impl Debug for JPEGQuality[src]

impl Default for JPEGQuality[src]

fn default() -> Self[src]

The default JPEG quality is 80.

impl Eq for JPEGQuality[src]

impl Ord for JPEGQuality[src]

impl PartialEq<JPEGQuality> for JPEGQuality[src]

impl PartialOrd<JPEGQuality> for JPEGQuality[src]

impl StructuralEq for JPEGQuality[src]

impl StructuralPartialEq for JPEGQuality[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.