pub fn instance_teardown(&mut self, instance_idx: u32) -> Result<(), UserError> {
		match self.instances.get_mut(instance_idx as usize) {
			None => Err(UserError("Trying to teardown a non-existent instance")),
			Some(None) => Err(UserError("Double teardown of an instance")),
			Some(instance) => {
				*instance = None;
				Ok(())
			}
		}
	}
/// Tear down the instance at the specified index.
///
/// # Errors
///
/// Returns `Err` if `instance_idx` isn't a valid index of an instance or
/// if it has been torn down.
Tear down the instance at the specified index.
Tear down the instance at the specified index .
pub fn instance_teardown(&mut self, instance_idx: u32) -> Result<(), UserError> {
		match self.instances.get_mut(instance_idx as usize) {
			None => Err(UserError("Trying to teardown a non-existent instance")),
			Some(None) => Err(UserError("Double teardown of an instance")),
			Some(instance) => {
				*instance = None;
				Ok(())
			}
		}
	}
pub fn instance_teardown ( & mut self , instance_idx : u32 ) -> Result < ( ) , UserError > { match self . instances . get_mut ( instance_idx as usize ) { None => Err ( UserError ( " " ) ) , Some ( None ) => Err ( UserError ( " " ) ) , Some ( instance ) => { * instance = None ; Ok ( ( ) ) } } }
Tear down the instance at the specified index.
Tear down the instance at the specified index .
&mut self
instance_idx
u32
&mut self
instance_idx
u32
errors
Returns `Err` if `instance_idx` isn't a valid index of an instance or
if it has been torn down.
Returns ` Err ` if ` instance_idx ` isn ' t a valid index of an instance or if it has been torn down .