pub struct Reader<'a> { /* private fields */ }Expand description
A cursor over a reassembled message.
Every multi-byte field in TDS below the packet header is little-endian, so unlike the PostgreSQL reader this one never sees a big-endian integer.
Implementations§
Source§impl<'a> Reader<'a>
impl<'a> Reader<'a>
pub fn new(bytes: &'a [u8]) -> Self
pub fn is_empty(&self) -> bool
pub fn remaining(&self) -> usize
pub fn take(&mut self, count: usize) -> Result<&'a [u8]>
pub fn skip(&mut self, count: usize) -> Result<()>
pub fn u8(&mut self) -> Result<u8>
pub fn u16(&mut self) -> Result<u16>
pub fn i32(&mut self) -> Result<i32>
pub fn u32(&mut self) -> Result<u32>
pub fn u64(&mut self) -> Result<u64>
Sourcepub fn us_varchar(&mut self) -> Result<String>
pub fn us_varchar(&mut self) -> Result<String>
A string with a two-byte character count.
Auto Trait Implementations§
impl<'a> Freeze for Reader<'a>
impl<'a> RefUnwindSafe for Reader<'a>
impl<'a> Send for Reader<'a>
impl<'a> Sync for Reader<'a>
impl<'a> Unpin for Reader<'a>
impl<'a> UnsafeUnpin for Reader<'a>
impl<'a> UnwindSafe for Reader<'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