Struct async_compression::util::PartialBuffer

source ·
pub struct PartialBuffer<B: AsRef<[u8]>> {
    buffer: B,
    index: usize,
}

Fields§

§buffer: B§index: usize

Implementations§

source§

impl<B: AsRef<[u8]>> PartialBuffer<B>

source

pub(crate) fn new(buffer: B) -> Self

source

pub(crate) fn written(&self) -> &[u8]

source

pub(crate) fn unwritten(&self) -> &[u8]

source

pub(crate) fn advance(&mut self, amount: usize)

source

pub(crate) fn get_mut(&mut self) -> &mut B

source

pub(crate) fn into_inner(self) -> B

source§

impl<B: AsRef<[u8]> + AsMut<[u8]>> PartialBuffer<B>

source

pub(crate) fn unwritten_mut(&mut self) -> &mut [u8]

source

pub(crate) fn copy_unwritten_from<C: AsRef<[u8]>>( &mut self, other: &mut PartialBuffer<C>, )

source§

impl<B: AsRef<[u8]> + Default> PartialBuffer<B>

source

pub(crate) fn take(&mut self) -> Self

Trait Implementations§

source§

impl<B: Debug + AsRef<[u8]>> Debug for PartialBuffer<B>

source§

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

Formats the value using the given formatter. Read more
source§

impl<B: Default + AsRef<[u8]>> Default for PartialBuffer<B>

source§

fn default() -> PartialBuffer<B>

Returns the “default value” for a type. Read more
source§

impl<B: AsRef<[u8]> + AsMut<[u8]>> From<B> for PartialBuffer<B>

source§

fn from(buffer: B) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<B> Freeze for PartialBuffer<B>
where B: Freeze,

§

impl<B> RefUnwindSafe for PartialBuffer<B>
where B: RefUnwindSafe,

§

impl<B> Send for PartialBuffer<B>
where B: Send,

§

impl<B> Sync for PartialBuffer<B>
where B: Sync,

§

impl<B> Unpin for PartialBuffer<B>
where B: Unpin,

§

impl<B> UnwindSafe for PartialBuffer<B>
where B: UnwindSafe,

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>,

§

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>,

§

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.