fn read_sandbox_memory_as<D: Decode>(
		&mut self,
		ptr: u32,
		len: u32,
	) -> Result<D, sp_sandbox::HostError> {
		let buf = self.read_sandbox_memory(ptr, len)?;
		D::decode(&mut &buf[..]).map_err(|_| sp_sandbox::HostError)
	}
/// Read designated chunk from the sandbox memory, consuming an appropriate amount of
/// gas, and attempt to decode into the specified type.
///
/// 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.
/// - the buffer contents cannot be decoded as the required type.
Read designated chunk from the sandbox memory, consuming an appropriate amount of
gas, and attempt to decode into the specified type.

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.
the buffer contents cannot be decoded as the required type.
Read designated chunk from the sandbox memory consuming an appropriate amount of gas and attempt to decode into the specified type . 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 . the buffer contents cannot be decoded as the required type .
fn read_sandbox_memory_as<D: Decode>(
		&mut self,
		ptr: u32,
		len: u32,
	) -> Result<D, sp_sandbox::HostError> {
		let buf = self.read_sandbox_memory(ptr, len)?;
		D::decode(&mut &buf[..]).map_err(|_| sp_sandbox::HostError)
	}
fn read_sandbox_memory_as < D : Decode > ( & mut self , ptr : u32 , len : u32 , ) -> Result < D , sp_sandbox :: HostError > { let buf = self . read_sandbox_memory ( ptr , len ) ? ; D :: decode ( & mut & buf [ .. ] ) . map_err ( | _ | sp_sandbox :: HostError ) }
Read designated chunk from the sandbox memory, consuming an appropriate amount of
gas, and attempt to decode into the specified type.
Read designated chunk from the sandbox memory consuming an appropriate amount of gas and attempt to decode into the specified type .
&mut self
ptr
u32
len
u32
&mut self
ptr
u32
len
u32