Struct Configuration

pub struct Configuration { /* private fields */ }

Describes the static parameters for creating a decoder.

Implementations

impl Configuration

fn new(order: BitOrder, size: u8) -> Self

Create a configuration to decode with the specified bit order and symbol size.

fn with_tiff_size_switch(order: BitOrder, size: u8) -> Self

Create a configuration for a TIFF compatible decoder.

fn with_yield_on_full_buffer(self, do_yield: bool) -> Self

Immediately yield to the caller when the decoder buffer is full.

This can be used for libtiff compatibility. It will use a "relaxed" stream interpretation that need not contain an explicit EOF. Instead, the decoder is expected to stop fetching symbols when some out-of-band specified length of the decoded text has been reached. The caller indicates this maximum length through the available output buffer space.

Symbols afterwards must not be expected to be valid. On filling the output buffer space completely, the decoder will return immediately to the caller instead of potentially interpreting the following bit-stream (and returning an error on doing so).

Default: false.

fn build(self) -> Decoder

Create a new decoder with the define configuration.

Trait Implementations

impl Clone for Configuration

fn clone(&self) -> Self

impl Debug for Configuration

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

Auto Trait Implementations

impl Freeze for Configuration

impl RefUnwindSafe for Configuration

impl Send for Configuration

impl Sync for Configuration

impl Unpin for Configuration

impl UnsafeUnpin for Configuration

impl UnwindSafe for Configuration

Blanket Implementations

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

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

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

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

impl<T> From<T> for Configuration

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

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

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

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