Skip to main content

Tail

Struct Tail 

Source
pub struct Tail;
Expand description

Combinator that returns the rest of the input bytes from the current position.

Trait Implementations§

Source§

impl Clone for Tail

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'x, I: VestInput + 'x, O: VestOutput<I>> Combinator<'x, I, O> for Tail

Source§

type Type = I

The result type of parsing
Source§

type SType = &'x I

The input type of serialization, often a reference to Self::Type. For “structural” formats though (e.g., crate::regular::sequence::Pair and crate::regular::variant::Choice), this is the tuple/sum of the corresponding Combinator::SType types.
Source§

fn length(&self, v: Self::SType) -> usize

The length of the output buffer. This can be used to optimize serialization by pre-allocating the buffer.
Source§

fn parse(&self, s: I) -> Result<(usize, Self::Type), ParseError>

The parsing function. To enable “zero-copy” parsing, implementations of parse should not consume/deepcopy the input buffer I, but rather return a slice of the input buffer for Self::Type whenever possible. See crate::buf_traits::VestInput and crate::buf_traits::VestPublicInput for more details. Read more
Source§

fn serialize( &self, v: Self::SType, data: &mut O, pos: usize, ) -> Result<usize, SerializeError>

The serialization function. The intended use of serialize is to serialize a value v into the buffer buf at the position pos “in-place” (i.e., without allocating a new buffer or extending the buffer). Read more
Source§

impl SpecCombinator for Tail

Source§

type Type = Seq<u8>

The view of [Combinator::Result].
Source§

impl View for Tail

Source§

impl SecureSpecCombinator for Tail

Auto Trait Implementations§

§

impl Freeze for Tail

§

impl RefUnwindSafe for Tail

§

impl Send for Tail

§

impl Sync for Tail

§

impl Unpin for Tail

§

impl UnsafeUnpin for Tail

§

impl UnwindSafe for Tail

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> CloneToUninit for T
where T: Clone,

Source§

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

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T
where T: View, <T as View>::V: SpecFrom<<T as View>::V>,

Source§

fn ex_from(t: T) -> T

Vest equivalent of std::convert::From::from.
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 T: View, U: View + From<T>, <U as View>::V: SpecFrom<<T as View>::V>,

Source§

fn ex_into(self) -> U

Vest equivalent of std::convert::Into::into.
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> SpecTryInto<U> for T
where U: SpecTryFrom<T>,

Source§

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

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

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

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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 T: View, U: View + TryFrom<T>, <U as View>::V: SpecTryFrom<<T as View>::V>,

Source§

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

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

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

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.
Source§

impl<T> SpecFrom<T> for T

Source§

impl<T, U> SpecInto<U> for T
where U: SpecFrom<T>,