Struct byte_slice::ByteStream [] [src]

pub struct ByteStream<'a> {
    pub byte: u8,
    pub mark_index: usize,
    pub stream: &'a [u8],
    pub stream_index: usize,
}

Default byte stream type.

All stream macros will accept any struct given as $context, as long as they contain the following four fields:

  • byte (u8) The most recent byte.
  • mark_index (usize) Starting index of a collection of marked bytes.
  • stream (&[u8]) Stream of bytes.
  • stream_index (usize) Current stream index.

Fields

Current byte.

Mark index.

Stream data.

Stream index.

Methods

impl<'a> ByteStream<'a>
[src]

Create a new ByteStream.

Trait Implementations

impl<'a> Debug for ByteStream<'a>
[src]

Formats the value using the given formatter.

impl<'a> Display for ByteStream<'a>
[src]

Formats the value using the given formatter. Read more