pub fn memory(&self, memory_idx: u32) -> Result<MemoryRef, UserError> {
		self.memories
			.get(memory_idx as usize)
			.cloned()
			.ok_or_else(|| UserError("Trying to access a non-existent sandboxed memory"))?
			.ok_or_else(|| UserError("Trying to access a torndown sandboxed memory"))
	}
/// Returns reference to a memory instance by `memory_idx`.
///
/// # Errors
///
/// Returns `Err` If `memory_idx` isn't a valid index of an memory or
/// if memory has been torn down.
Returns reference to a memory instance by `memory_idx`.
Returns reference to a memory instance by ` memory_idx ` .
pub fn memory(&self, memory_idx: u32) -> Result<MemoryRef, UserError> {
		self.memories
			.get(memory_idx as usize)
			.cloned()
			.ok_or_else(|| UserError("Trying to access a non-existent sandboxed memory"))?
			.ok_or_else(|| UserError("Trying to access a torndown sandboxed memory"))
	}
pub fn memory ( & self , memory_idx : u32 ) -> Result < MemoryRef , UserError > { self . memories . get ( memory_idx as usize ) . cloned ( ) . ok_or_else ( | | UserError ( " " ) ) ? . ok_or_else ( | | UserError ( " " ) ) }
Returns reference to a memory instance by `memory_idx`.
Returns reference to a memory instance by ` memory_idx ` .
&self
memory_idx
u32
&self
memory_idx
u32
errors
Returns `Err` If `memory_idx` isn't a valid index of an memory or
if memory has been torn down.
Returns ` Err ` If ` memory_idx ` isn ' t a valid index of an memory or if memory has been torn down .