Skip to main content

Buffer

Struct Buffer 

Source
pub struct Buffer<S: Scanner> { /* private fields */ }
Expand description

Reusable metadata storage that retains classification with its bytes.

Implementations§

Source§

impl<S: Scanner> Buffer<S>

Source

pub const fn new() -> Self

Source

pub fn clear(&mut self)

Source

pub fn len(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Source

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

Source

pub fn copy_prefix(&mut self, prefix: Prefix<'_, S>) -> Result<(), Error>

Source

pub fn writer(&mut self, limit: Option<usize>) -> Writer<'_, S>

Source§

impl Buffer<Scan>

Source

pub fn named(&self) -> Named<'_>

Source

pub fn copy_from(&mut self, name: Named<'_>) -> Result<(), Error>

Source§

impl Buffer<Value>

Source

pub fn valued(&self) -> Valued<'_>

Source

pub fn copy_from(&mut self, value: Valued<'_>) -> Result<(), Error>

Trait Implementations§

Source§

impl<S: Scanner> Default for Buffer<S>

Source§

fn default() -> Self

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

Auto Trait Implementations§

§

impl<S> Forget for Buffer<S>

§

impl<S> Freeze for Buffer<S>
where S: Freeze, Option<<S as Scanner>::Proof>: Freeze,

§

impl<S> RefUnwindSafe for Buffer<S>

§

impl<S> Send for Buffer<S>
where S: Send, Option<<S as Scanner>::Proof>: Send,

§

impl<S> Sync for Buffer<S>
where S: Sync, Option<<S as Scanner>::Proof>: Sync,

§

impl<S> Unpin for Buffer<S>
where S: Unpin, Option<<S as Scanner>::Proof>: Unpin,

§

impl<S> UnsafeUnpin for Buffer<S>

§

impl<S> UnwindSafe for Buffer<S>

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> Convert<T> for T

Source§

fn into(self) -> T

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.