pub async fn stop_component<'a>(
        &'a mut self,
        timer: BoxFuture<'a, ()>,
    ) -> Result<StopComponentSuccess, StopComponentError> {
        // Potentially there is no controller, perhaps because the component
        // has no running code. In this case this is a no-op.
        if let Some(controller) = self.controller.as_ref() {
            stop_component_internal(controller, timer).await
        } else {
            // TODO(jmatt) Need test coverage
            Ok(StopComponentSuccess::NoController)
        }
    }
/// Stop the component. The timer defines how long the component is given
/// to stop itself before we request the controller terminate the
/// component.
Stop the component. The timer defines how long the component is given
to stop itself before we request the controller terminate the
component.
Stop the component . The timer defines how long the component is given to stop itself before we request the controller terminate the component .
pub async fn stop_component<'a>(
        &'a mut self,
        timer: BoxFuture<'a, ()>,
    ) -> Result<StopComponentSuccess, StopComponentError> {
        // Potentially there is no controller, perhaps because the component
        // has no running code. In this case this is a no-op.
        if let Some(controller) = self.controller.as_ref() {
            stop_component_internal(controller, timer).await
        } else {
            // TODO(jmatt) Need test coverage
            Ok(StopComponentSuccess::NoController)
        }
    }
pub async fn stop_component < ' a > ( & ' a mut self , timer : BoxFuture < ' a , ( ) > , ) -> Result < StopComponentSuccess , StopComponentError > { // Potentially there is no controller, perhaps because the component // has no running code. In this case this is a no-op. if let Some ( controller ) = self . controller . as_ref ( ) { stop_component_internal ( controller , timer ) . await } else { // TODO(jmatt) Need test coverage Ok ( StopComponentSuccess :: NoController ) } }
Stop the component.
Stop the component .
&'a mut self
timer
BoxFuture<'a, ()>
&'a mut self
timer
BoxFuture<'a, ()>