pub struct Cursor<T> {
pub buf: Vec<T>,
pub index: usize,
}Expand description
Data of input. Buffer and current index.
Fields§
§buf: Vec<T>Sequence of items, you may append items to this when you want. This crate loosely assumes that you don’t remove items from this.
index: usizeCurrent index of the cursor.
This crate assumes index <= buf.len().
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Cursor<T>
impl<T> RefUnwindSafe for Cursor<T>where
T: RefUnwindSafe,
impl<T> Send for Cursor<T>where
T: Send,
impl<T> Sync for Cursor<T>where
T: Sync,
impl<T> Unpin for Cursor<T>where
T: Unpin,
impl<T> UnwindSafe for Cursor<T>where
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