Skip to main content

RepeatTillEnd

Struct RepeatTillEnd 

Source
pub struct RepeatTillEnd<C>(pub C);
Expand description

Sugar for Repeat(C, Eof).

Tuple Fields§

§0: C

Trait Implementations§

Source§

impl<A, T> ByteLen<&[T]> for RepeatTillEnd<A>
where A: ByteLen<T> + Copy, T: DeepView,

Source§

fn length(&self, v: &&[T]) -> usize

Returns the exact number of bytes produced by serialization.
Source§

impl<A, T> ByteLen<Vec<T>> for RepeatTillEnd<A>
where A: ByteLen<T> + Copy, T: DeepView,

Available on crate feature alloc only.
Source§

fn length(&self, v: &Vec<T>) -> usize

Returns the exact number of bytes produced by serialization.
Source§

impl<C: Clone> Clone for RepeatTillEnd<C>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<C> Consistency for RepeatTillEnd<C>
where C: Consistency,

Source§

type Val = Seq<<C as Consistency>::Val>

The type of values whose consistency is being checked.
Source§

impl<C: Copy> Copy for RepeatTillEnd<C>

Source§

impl<A, T> DerOrd<Vec<T>> for RepeatTillEnd<A>
where T: DeepView, A: DerOrd<T> + Copy,

Available on crate feature alloc only.
Source§

fn der_start(&self, v: &Vec<T>) -> StarDerState<A::State>

Start traversing the encoding of value.
Source§

fn der_next(&self, v: &Vec<T>, state: &mut StarDerState<A::State>) -> Option<u8>

Return the next encoded octet, or None exactly at the end of the encoding.
Source§

fn der_leq(&self, left: &T, right: &T) -> bool

Compare two values by the complete DER TLV octets produced by this format.
Source§

impl<A: DerState> DerState for RepeatTillEnd<A>

Available on crate feature alloc only.
Source§

impl<C: EquivSerializersGeneral> EquivSerializers for RepeatTillEnd<C>

Source§

impl<C: GoodSerializer> GoodSerializer for RepeatTillEnd<C>

Source§

impl<C: NonMalleable + SafeParser> NonMalleable for RepeatTillEnd<C>

Source§

impl<I, A> Parser<I> for RepeatTillEnd<A>
where I: InputBuf, A: Parser<I> + SafeParser + Productive + Copy,

Available on crate feature alloc only.
Source§

type PT = Vec<<A as Parser<I>>::PT>

Executable value returned by this parser.
Source§

fn min_byte_len(&self) -> usize

A lower bound on the number of bytes one successful parse consumes. Read more
Source§

fn parse(&self, ibuf: &I) -> PResult<Self::PT>

Parses a prefix of ibuf.
Source§

impl<A, T> Prepare<&[T]> for RepeatTillEnd<A>
where A: Prepare<T> + Copy, T: DeepView,

Source§

fn prepare(&self, v: &&[T]) -> Result<usize, PreSerializeError>

Validates v and returns its exact serialized length.
Source§

impl<A, T> Prepare<Vec<T>> for RepeatTillEnd<A>
where A: Prepare<T> + Copy, T: DeepView,

Available on crate feature alloc only.
Source§

fn prepare(&self, v: &Vec<T>) -> Result<usize, PreSerializeError>

Validates v and returns its exact serialized length.
Source§

impl<C: SafeParser> Productive for RepeatTillEnd<C>

Source§

impl<C: SPRoundTripDps + NonTailFmt + Productive> SPRoundTripDps for RepeatTillEnd<C>

Source§

impl<C> SafeParser for RepeatTillEnd<C>
where C: SafeParser,

Source§

impl<Output: OutputBuf, A, T> Serializer<Output, &[T]> for RepeatTillEnd<A>
where A: Serializer<Output, T> + Copy, T: DeepView,

Source§

fn serialize_into(&self, v: &&[T], obuf: &mut Output)

Serializes the value v into the output buffer obuf by (logically) appending the serialized bytes to the end of obuf. This view has two main benefits: Read more
Source§

impl<Output: OutputBuf, A, T> Serializer<Output, Vec<T>> for RepeatTillEnd<A>
where A: Serializer<Output, T> + Copy, T: DeepView,

Available on crate feature alloc only.
Source§

fn serialize_into(&self, v: &Vec<T>, obuf: &mut Output)

Serializes the value v into the output buffer obuf by (logically) appending the serialized bytes to the end of obuf. This view has two main benefits: Read more
Source§

impl<C> SoundParser for RepeatTillEnd<C>
where C: SoundParser,

Source§

impl<C: SpecByteLen> SpecByteLen for RepeatTillEnd<C>

Source§

type T = Seq<<C as SpecByteLen>::T>

The type of values whose byte length is being computed.
Source§

impl<C: SpecParser> SpecParser for RepeatTillEnd<C>

Source§

type PVal = Seq<<C as SpecParser>::PVal>

The type of parsed values.
Source§

impl<C: SpecSerializer> SpecSerializer for RepeatTillEnd<C>

Source§

type SVal = Seq<<C as SpecSerializer>::SVal>

The type of values to be serialized.
Source§

impl<C: SpecSerializerDps> SpecSerializerDps for RepeatTillEnd<C>

Source§

type SValue = Seq<<C as SpecSerializerDps>::SValue>

The type of values to be serialized.
Source§

impl<C: ValueByteLen> ValueByteLen for RepeatTillEnd<C>

Auto Trait Implementations§

§

impl<C> Freeze for RepeatTillEnd<C>
where C: Freeze,

§

impl<C> RefUnwindSafe for RepeatTillEnd<C>
where C: RefUnwindSafe,

§

impl<C> Send for RepeatTillEnd<C>
where C: Send,

§

impl<C> Sync for RepeatTillEnd<C>
where C: Sync,

§

impl<C> Unpin for RepeatTillEnd<C>
where C: Unpin,

§

impl<C> UnsafeUnpin for RepeatTillEnd<C>
where C: UnsafeUnpin,

§

impl<C> UnwindSafe for RepeatTillEnd<C>
where C: 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> 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

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<C> NonAmbiguous for C
where C: SPRoundTrip,

Source§

impl<C> PSRoundTrip for C

Source§

impl<C> SPRoundTrip for C

Source§

impl<T, S> SerializerExt<T> for S
where S: SpecByteLen<T = <T as DeepView>::V> + SpecSerializer<SVal = <T as DeepView>::V> + Consistency<Val = <T as DeepView>::V>, T: DeepView + ?Sized,

Source§

fn serialize<'a>(&self, v: &T, obuf: &'a mut [u8])
where Self: Serializer<OutputSlice<'a>, T>,

Serializes into an exactly-sized caller-provided slice without allocating.
Source§

fn serialize_with_vec(&self, v: &T, obuf: &mut Vec<u8>)
where Self: Serializer<Vec<u8>, T>,

Serializes by appending to a growable Vec (though the Vec can be preallocated with Prepare/ByteLen).
Source§

impl<T> SpecCombinator for T
where T: SpecParser<PVal = <T as SpecByteLen>::T> + SpecByteLen + SpecSerializer<SVal = <T as SpecByteLen>::T> + Consistency<Val = <T as SpecByteLen>::T> + SpecSerializerDps<SValue = <T as SpecByteLen>::T>,

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

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.