pub struct ByteInput<'a> { /* private fields */ }Implementations§
Trait Implementations§
Source§impl<'a> Input for ByteInput<'a>
impl<'a> Input for ByteInput<'a>
type Checkpoint = usize
type Slice = &'a [u8]
type Token = u8
Source§fn next_token(&mut self) -> Option<u8>
fn next_token(&mut self) -> Option<u8>
1トークン消費して返す。EOF なら None。
Source§fn peek_token(&self) -> Option<u8>
fn peek_token(&self) -> Option<u8>
次のトークンを消費せずに返す。
Source§fn slice_since(&self, cp: usize) -> &'a [u8]
fn slice_since(&self, cp: usize) -> &'a [u8]
checkpoint から現在位置までの Slice を返す。
fn checkpoint(&self) -> usize
fn reset(&mut self, cp: usize)
fn offset(&self) -> usize
fn remaining(&self) -> &'a [u8]
fn is_eof(&self) -> bool
Auto Trait Implementations§
impl<'a> Freeze for ByteInput<'a>
impl<'a> RefUnwindSafe for ByteInput<'a>
impl<'a> Send for ByteInput<'a>
impl<'a> Sync for ByteInput<'a>
impl<'a> Unpin for ByteInput<'a>
impl<'a> UnsafeUnpin for ByteInput<'a>
impl<'a> UnwindSafe for ByteInput<'a>
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