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) -> SelfCreates a new
Adam7Info. May panic if the arguments are out of range (e.g. ifpassis 0 or greater than 8).passcorresponds to a pass of the the Adam7 algorithmlineis the number of a line within a pass (starting with 0). For example, in an image of height 8,linecan be beteween0..4in the 7thpass(those 4 interlaced rows correspond to 2nd, 4th, 6th, and 8th row of the full image).widthdescribes 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 byReader::next_interlaced_rowand there is no need to create them by callingAdam7Info::new.Adam7Info::newis nevertheless exposed as a public API, because it helps to provide self-contained example usage ofexpand_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) -> TReturns the argument unchanged.
impl<T> ToOwned for Adam7Info
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for Adam7Info
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses 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>