pub struct RepeatedView<B, T: HasView<B> + NextLayer> { /* private fields */ }Expand description
A borrowed block of headers whose elements are parsed identically (i.e., using the same
choice or Ingot type), and may be chained using hint values.
Implementations§
Trait Implementations§
Source§impl<B: ByteSliceMut, T: HasView<B> + NextLayer> AsMut<[u8]> for RepeatedView<B, T>
impl<B: ByteSliceMut, T: HasView<B> + NextLayer> AsMut<[u8]> for RepeatedView<B, T>
Source§impl<B: ByteSlice, T: HeaderLen + NextLayer + HasView<B>> Emit for RepeatedView<B, T>
impl<B: ByteSlice, T: HeaderLen + NextLayer + HasView<B>> Emit for RepeatedView<B, T>
Source§fn emit_raw<V: ByteSliceMut>(&self, buf: V) -> usize
fn emit_raw<V: ByteSliceMut>(&self, buf: V) -> usize
Writes this packet’s contents into a target buffer without
performing length checks. Read more
Source§fn needs_emit(&self) -> bool
fn needs_emit(&self) -> bool
Returns whether this packet needs a full re-emit, and
has not been simply modified in-place. Read more
Source§fn emit<V: ByteSliceMut>(&self, buf: V) -> ParseResult<usize>
fn emit<V: ByteSliceMut>(&self, buf: V) -> ParseResult<usize>
Writes this packet’s contents into a target buffer.
Source§fn emit_prefix<V: SplitByteSliceMut>(&self, buf: V) -> ParseResult<V>
fn emit_prefix<V: SplitByteSliceMut>(&self, buf: V) -> ParseResult<V>
Writes this packet’s contents into the start of a target buffer.
Source§fn emit_suffix<V: SplitByteSliceMut>(&self, buf: V) -> ParseResult<V>
fn emit_suffix<V: SplitByteSliceMut>(&self, buf: V) -> ParseResult<V>
Writes this packet’s contents at the end of a target buffer.
Source§impl<B: ByteSlice, T: HeaderLen + NextLayer + HasView<B>> HeaderLen for RepeatedView<B, T>
impl<B: ByteSlice, T: HeaderLen + NextLayer + HasView<B>> HeaderLen for RepeatedView<B, T>
Source§const MINIMUM_LENGTH: usize = 0usize
const MINIMUM_LENGTH: usize = 0usize
The minimum number of bytes a packet of this kind occupies
when serialised.
Source§fn packet_length(&self) -> usize
fn packet_length(&self) -> usize
The number of bytes which this packet would occupy when serialised. Read more
Source§impl<B: SplitByteSlice, T> HeaderParse<B> for RepeatedView<B, T>
impl<B: SplitByteSlice, T> HeaderParse<B> for RepeatedView<B, T>
Source§fn parse_choice(data: B, hint: Option<T::Hint>) -> ParseResult<Success<Self, B>>
fn parse_choice(data: B, hint: Option<T::Hint>) -> ParseResult<Success<Self, B>>
Parse a view-type from a given buffer, using a hint
Source§fn parse(from: B) -> ParseResult<Success<Self, B>>
fn parse(from: B) -> ParseResult<Success<Self, B>>
Parse a view-type from a given buffer.
Source§impl<B: ByteSlice, T: for<'a> HasView<&'a [u8]> + HasView<B> + NextLayer<Hint = <T as NextLayer>::Denom>> NextLayer for RepeatedView<B, T>
impl<B: ByteSlice, T: for<'a> HasView<&'a [u8]> + HasView<B> + NextLayer<Hint = <T as NextLayer>::Denom>> NextLayer for RepeatedView<B, T>
Source§impl<B: SplitByteSlice, T, E> ToOwnedPacket for RepeatedView<B, T>where
T: for<'a> HasView<&'a [u8]> + NextLayer<Hint = <T as NextLayer>::Denom> + HasView<B>,
for<'a> <T as HasView<&'a [u8]>>::ViewType: HeaderParse<&'a [u8]> + NextLayer<Denom = T::Denom, Hint = T::Hint>,
for<'a, 'b> &'b <T as HasView<&'a [u8]>>::ViewType: TryInto<T, Error = E>,
ParseError: From<E>,
impl<B: SplitByteSlice, T, E> ToOwnedPacket for RepeatedView<B, T>where
T: for<'a> HasView<&'a [u8]> + NextLayer<Hint = <T as NextLayer>::Denom> + HasView<B>,
for<'a> <T as HasView<&'a [u8]>>::ViewType: HeaderParse<&'a [u8]> + NextLayer<Denom = T::Denom, Hint = T::Hint>,
for<'a, 'b> &'b <T as HasView<&'a [u8]>>::ViewType: TryInto<T, Error = E>,
ParseError: From<E>,
Auto Trait Implementations§
impl<B, T> Freeze for RepeatedView<B, T>where
B: Freeze,
impl<B, T> RefUnwindSafe for RepeatedView<B, T>where
B: RefUnwindSafe,
T: RefUnwindSafe,
impl<B, T> Send for RepeatedView<B, T>
impl<B, T> Sync for RepeatedView<B, T>
impl<B, T> Unpin for RepeatedView<B, T>
impl<B, T> UnwindSafe for RepeatedView<B, T>where
B: UnwindSafe,
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more