Struct Adam7Info

pub struct Adam7Info { /* private fields */ }

Describes which stage of the Adam7 algorithm applies to a decoded row.

See also Reader::next_interlaced_row.

Implementations

impl Adam7Info

fn new(pass: u8, line: u32, width: u32) -> Self

Creates a new Adam7Info. May panic if the arguments are out of range (e.g. if pass is 0 or greater than 8).

  • pass corresponds to a pass of the the Adam7 algorithm
  • line is the number of a line within a pass (starting with 0). For example, in an image of height 8, line can be beteween 0..4 in the 7th pass (those 4 interlaced rows correspond to 2nd, 4th, 6th, and 8th row of the full image).
  • width describes how many pixels are in a full row of the image. The bytes in each passline of the Adam7 are calculated from this number.

Note that in typical usage, Adam7Infos are returned by Reader::next_interlaced_row and there is no need to create them by calling Adam7Info::new. Adam7Info::new is nevertheless exposed as a public API, because it helps to provide self-contained example usage of expand_interlaced_row.

Trait Implementations

impl Clone for Adam7Info

fn clone(&self) -> Self

impl Copy for Adam7Info

impl Debug for Adam7Info

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

impl Eq for Adam7Info

impl PartialEq for Adam7Info

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

impl StructuralPartialEq for Adam7Info

Auto Trait Implementations

impl Freeze for Adam7Info

impl RefUnwindSafe for Adam7Info

impl Send for Adam7Info

impl Sync for Adam7Info

impl Unpin for Adam7Info

impl UnsafeUnpin for Adam7Info

impl UnwindSafe for Adam7Info

Blanket Implementations

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

fn type_id(&self) -> TypeId

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

fn borrow(&self) -> &T

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

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

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

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

impl<T> From<T> for Adam7Info

fn from(t: T) -> T

Returns the argument unchanged.

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

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

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

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

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

type Error = never;
fn try_from(value: U) -> Result<T, never>

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

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