[][src]Struct astcenc_rs::ConfigBuilder

pub struct ConfigBuilder { /* fields omitted */ }

Builder for the context configuration.

Implementations

impl ConfigBuilder[src]

pub fn new() -> Self[src]

Create a new, default configuration.

pub fn profile(&mut self, profile: Profile) -> &mut Self[src]

Set the color profile, i.e. the accepted range of the input components.

pub fn with_profile(self, profile: Profile) -> Self[src]

Set the color profile, i.e. the accepted range of the input components.

pub fn preset(&mut self, preset: Preset) -> &mut Self[src]

Set the preset, i.e. the balance between speed and quality (not speed and compression ratio, compression ratio, compression ratio is decided by the block size).

pub fn with_preset(self, preset: Preset) -> Self[src]

Set the preset, i.e. the balance between speed and quality (not speed and compression ratio, compression ratio, compression ratio is decided by the block size).

pub fn block_size(&mut self, block_size: Extents) -> &mut Self[src]

Set the block size, which decides the compression ratio for the image. Each block uses 16 bytes of memory.

pub fn with_block_size(self, block_size: Extents) -> Self[src]

Set the block size, which decides the compression ratio for the image. Each block uses 16 bytes of memory.

pub fn build(self) -> Result<Config, Error>[src]

Create the config from these settings.

Trait Implementations

impl Clone for ConfigBuilder[src]

impl Default for ConfigBuilder[src]

impl Hash for ConfigBuilder[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> 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.