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
byte: u8
Current byte.
mark_index: usize
Callback mark index.
stream: &'a [u8]
Stream data.
stream_index: usize
Stream index.
Methods
impl<'a> ByteStream<'a>
[src]
fn new(stream: &'a [u8]) -> ByteStream<'a>
Create a new ByteStream
.