Skip to main content

driver_manager_shutdown/
shutdown_node.rs

1// Copyright 2026 The Fuchsia Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5use crate::node_shutdown_coordinator::{NodeShutdownCoordinator, ShutdownIntent};
6use async_trait::async_trait;
7use std::cell::RefMut;
8
9#[async_trait(?Send)]
10pub trait ShutdownNode {
11    fn get_shutdown_coordinator(&self) -> RefMut<'_, NodeShutdownCoordinator>;
12    fn name(&self) -> &str;
13    async fn finish_shutdown(&self);
14    fn schedule_post_shutdown(&self, intent: ShutdownIntent);
15    fn set_should_destroy_driver_component(&self, val: bool);
16}