Struct concordium_contracts_common::Chain
source · pub struct Chain<T, U> { /* private fields */ }
Expand description
Adapter to chain together two readers.
Implementations§
Trait Implementations§
source§impl<'a, 'b, T: Read, U: Read> Read for Chain<&'a mut T, &'b mut U>
impl<'a, 'b, T: Read, U: Read> Read for Chain<&'a mut T, &'b mut U>
source§fn read(&mut self, buf: &mut [u8]) -> ParseResult<usize>
fn read(&mut self, buf: &mut [u8]) -> ParseResult<usize>
Read a number of bytes into the provided buffer. The returned value is
Ok(n)
if a read was successful, and n
bytes were read (n
could be
0).source§fn read_exact(&mut self, buf: &mut [u8]) -> ParseResult<()>
fn read_exact(&mut self, buf: &mut [u8]) -> ParseResult<()>
Read exactly the required number of bytes. If not enough bytes could be
read the function returns
Err(_)
, and the contents of the given buffer
is unspecified.source§fn read_u64(&mut self) -> ParseResult<u64>
fn read_u64(&mut self) -> ParseResult<u64>
Read a
u64
in little-endian format.source§fn read_u32(&mut self) -> ParseResult<u32>
fn read_u32(&mut self) -> ParseResult<u32>
Read a
u32
in little-endian format.source§fn read_u16(&mut self) -> ParseResult<u16>
fn read_u16(&mut self) -> ParseResult<u16>
Read a
u16
in little-endian format.source§fn read_u8(&mut self) -> ParseResult<u8>
fn read_u8(&mut self) -> ParseResult<u8>
Read a
u8
.source§fn read_i64(&mut self) -> ParseResult<i64>
fn read_i64(&mut self) -> ParseResult<i64>
Read a
i64
in little-endian format.source§fn read_i32(&mut self) -> ParseResult<i32>
fn read_i32(&mut self) -> ParseResult<i32>
Read a
i32
in little-endian format.source§fn read_i16(&mut self) -> ParseResult<i16>
fn read_i16(&mut self) -> ParseResult<i16>
Read a
i16
in little-endian format.source§fn read_i8(&mut self) -> ParseResult<i8>
fn read_i8(&mut self) -> ParseResult<i8>
Read a
i32
in little-endian format.source§fn read_array<const N: usize>(&mut self) -> ParseResult<[u8; N]>
fn read_array<const N: usize>(&mut self) -> ParseResult<[u8; N]>
Load an array of the given size.
Auto Trait Implementations§
impl<T, U> Freeze for Chain<T, U>
impl<T, U> RefUnwindSafe for Chain<T, U>where
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<T, U> Send for Chain<T, U>
impl<T, U> Sync for Chain<T, U>
impl<T, U> Unpin for Chain<T, U>
impl<T, U> UnwindSafe for Chain<T, U>where
T: UnwindSafe,
U: 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