Struct concordium_contracts_common::Cursor [−][src]
Add offset tracking inside a data structure.
Fields
offset: usize
data: T
Implementations
impl<T> Cursor<T>
[src]
Trait Implementations
impl<T: AsRef<[u8]>> Read for Cursor<T>
[src]
fn read(&mut self, buf: &mut [u8]) -> ParseResult<usize>
[src]
fn read_exact(&mut self, buf: &mut [u8]) -> ParseResult<()>
[src]
fn read_u64(&mut self) -> ParseResult<u64>
[src]
fn read_u32(&mut self) -> ParseResult<u32>
[src]
fn read_u16(&mut self) -> ParseResult<u16>
[src]
fn read_u8(&mut self) -> ParseResult<u8>
[src]
fn read_i64(&mut self) -> ParseResult<i64>
[src]
fn read_i32(&mut self) -> ParseResult<i32>
[src]
fn read_i16(&mut self) -> ParseResult<i16>
[src]
fn read_i8(&mut self) -> ParseResult<i8>
[src]
impl Write for Cursor<&mut Vec<u8>>
[src]
type Err = ()
fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Err>
[src]
fn write_all(&mut self, buf: &[u8]) -> Result<(), Self::Err>
[src]
fn write_u8(&mut self, x: u8) -> Result<(), Self::Err>
[src]
fn write_u16(&mut self, x: u16) -> Result<(), Self::Err>
[src]
fn write_u32(&mut self, x: u32) -> Result<(), Self::Err>
[src]
fn write_u64(&mut self, x: u64) -> Result<(), Self::Err>
[src]
fn write_i8(&mut self, x: i8) -> Result<(), Self::Err>
[src]
fn write_i16(&mut self, x: i16) -> Result<(), Self::Err>
[src]
fn write_i32(&mut self, x: i32) -> Result<(), Self::Err>
[src]
fn write_i64(&mut self, x: i64) -> Result<(), Self::Err>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Cursor<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Cursor<T> where
T: Send,
T: Send,
impl<T> Sync for Cursor<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Cursor<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Cursor<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,