Skip to main content

Supervisor

Struct Supervisor 

Source
pub struct Supervisor<'a> {
    pub virtual_file_system: &'static VirtualFileSystem,
    pub time_manager: &'static Manager<'static>,
    pub task: TaskIdentifier,
    pub services: &'a [TaskIdentifier],
    pub budget: Duration,
}
Expand description

Runs the pipeline for a platform: quiesce the descendants of task (except services), commit storage, stop drivers, then perform the action through the power device.

The power device is opened by task before anything is stopped, so the final action does not depend on path resolution after the root filesystem was unmounted, and an unsupported action fails before any work is done.

Fields§

§virtual_file_system: &'static VirtualFileSystem§time_manager: &'static Manager<'static>§task: TaskIdentifier

Supervisor task; its descendants are stopped.

§services: &'a [TaskIdentifier]

Runtime service subtrees left running (stopped by Drivers).

§budget: Duration

Quiescence budget on the monotonic clock.

Implementations§

Source§

impl Supervisor<'_>

Source

pub async fn run( &self, controller: &Controller, drivers: &mut impl Drivers, ) -> Result<(), Error>

Run the accepted request of controller once. Returns only on failure or when the final action returns.

Auto Trait Implementations§

§

impl<'a> Freeze for Supervisor<'a>

§

impl<'a> !RefUnwindSafe for Supervisor<'a>

§

impl<'a> Send for Supervisor<'a>

§

impl<'a> Sync for Supervisor<'a>

§

impl<'a> Unpin for Supervisor<'a>

§

impl<'a> UnsafeUnpin for Supervisor<'a>

§

impl<'a> !UnwindSafe for Supervisor<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.