pub struct Cursor<'a> {
pub bytes: &'a [u8],
pub pos: usize,
}Fields§
§bytes: &'a [u8]§pos: usizeImplementations§
Source§impl<'a> Cursor<'a>
impl<'a> Cursor<'a>
pub fn new(bytes: &'a [u8]) -> Self
pub fn remaining(&self) -> usize
pub fn take_u16(&mut self) -> Result<u16, DbError>
pub fn take_u8(&mut self) -> Result<u8, DbError>
pub fn take_u32(&mut self) -> Result<u32, DbError>
pub fn take_i64(&mut self) -> Result<i64, DbError>
pub fn take_u64(&mut self) -> Result<u64, DbError>
pub fn take_f64(&mut self) -> Result<f64, DbError>
pub fn take_bytes(&mut self, n: usize) -> Result<Vec<u8>, DbError>
Auto Trait Implementations§
impl<'a> Freeze for Cursor<'a>
impl<'a> RefUnwindSafe for Cursor<'a>
impl<'a> Send for Cursor<'a>
impl<'a> Sync for Cursor<'a>
impl<'a> Unpin for Cursor<'a>
impl<'a> UnsafeUnpin for Cursor<'a>
impl<'a> UnwindSafe for Cursor<'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