Window

Struct Window 

Source
pub struct Window<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> Window<'a>

Source

pub fn into_raw_parts(self) -> (*mut u8, usize)

Source

pub unsafe fn from_raw_parts(ptr: *mut u8, len: usize) -> Self

Source

pub fn is_empty(&self) -> bool

Source

pub fn buffer_size(&self) -> usize

The size of the underlying buffer. For inflate, use size instead. This function is used in inflateBack which does not consider the padding.

Source

pub fn size(&self) -> usize

Source

pub fn have(&self) -> usize

number of bytes in the window. Saturates at Self::capacity.

Source

pub unsafe fn set_have(&mut self, have: usize)

Source

pub fn next(&self) -> usize

Position where the next byte will be written

Source

pub fn empty() -> Self

Source

pub fn clear(&mut self)

Source

pub fn as_slice(&self) -> &[u8]

Source

pub fn as_ptr(&self) -> *const u8

Source

pub fn extend( &mut self, slice: &[u8], flags: i32, update_checksum: bool, checksum: &mut u32, crc_fold: &mut Crc32Fold, )

Source

pub unsafe fn clone_to(&self, ptr: *mut u8, len: usize) -> Self

Source

pub fn padding() -> usize

Trait Implementations§

Source§

impl<'a> Debug for Window<'a>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for Window<'a>

§

impl<'a> RefUnwindSafe for Window<'a>

§

impl<'a> !Send for Window<'a>

§

impl<'a> !Sync for Window<'a>

§

impl<'a> Unpin for Window<'a>

§

impl<'a> !UnwindSafe for Window<'a>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.