fn read_sandbox_memory_into_buf(
		&mut self,
		ptr: u32,
		buf: &mut [u8],
	) -> Result<(), sp_sandbox::HostError> {
		self.charge_gas(
			RuntimeToken::ReadMemory(buf.len() as u32),
		)?;

		self.memory.get(ptr, buf).map_err(Into::into)
	}
/// Read designated chunk from the sandbox memory into the supplied buffer, consuming
/// an appropriate amount of gas.
///
/// Returns `Err` if one of the following conditions occurs:
///
/// - calculating the gas cost resulted in overflow.
/// - out of gas
/// - requested buffer is not within the bounds of the sandbox memory.
Read designated chunk from the sandbox memory into the supplied buffer, consuming
an appropriate amount of gas.

Returns `Err` if one of the following conditions occurs.

calculating the gas cost resulted in overflow.
out of gas
requested buffer is not within the bounds of the sandbox memory.
Read designated chunk from the sandbox memory into the supplied buffer consuming an appropriate amount of gas . Returns ` Err ` if one of the following conditions occurs . calculating the gas cost resulted in overflow . out of gas requested buffer is not within the bounds of the sandbox memory .
fn read_sandbox_memory_into_buf(
		&mut self,
		ptr: u32,
		buf: &mut [u8],
	) -> Result<(), sp_sandbox::HostError> {
		self.charge_gas(
			RuntimeToken::ReadMemory(buf.len() as u32),
		)?;
		self.memory.get(ptr, buf).map_err(Into::into)
	}
fn read_sandbox_memory_into_buf ( & mut self , ptr : u32 , buf : & mut [ u8 ] , ) -> Result < ( ) , sp_sandbox :: HostError > { self . charge_gas ( RuntimeToken :: ReadMemory ( buf . len ( ) as u32 ) , ) ? ; self . memory . get ( ptr , buf ) . map_err ( Into :: into ) }
Read designated chunk from the sandbox memory into the supplied buffer, consuming
an appropriate amount of gas.
Read designated chunk from the sandbox memory into the supplied buffer consuming an appropriate amount of gas .
&mut self
ptr
u32
buf
&mut [u8]
&mut self
ptr
u32
buf
&mut [u8]