Skip to main content

DiagnosticAction

Enum DiagnosticAction 

Source
pub enum DiagnosticAction<Route, Diagnostic> {
    Deliver {
        route: Route,
        diagnostic: Diagnostic,
    },
    Terminal {
        diagnostic: Diagnostic,
    },
}
Expand description

One complete diagnostic selected for delivery or terminal custody.

A route for another diagnostic protocol cannot become an action item:

ⓘ
fn require_action<Item: behavior::ActionItem>(_: Item) {}
let route = behavior::Recipient::<behavior::MessageProtocol<behavior::MailAddr, u8>>::global(behavior::MailAddr(1));
require_action(behavior_actors::atomic::DiagnosticAction::deliver(route, String::from("failed")));

Variants§

§

Deliver

Fields

§route: Route
§diagnostic: Diagnostic
§

Terminal

Fields

§diagnostic: Diagnostic

Implementations§

Source§

impl<Route, Diagnostic> DiagnosticAction<Route, Diagnostic>

Source

pub const fn deliver(route: Route, diagnostic: Diagnostic) -> Self

Construct one routed diagnostic without cloning its payload.

Source

pub const fn terminal(diagnostic: Diagnostic) -> Self

Construct one route-free terminal diagnostic.

Trait Implementations§

Source§

impl<Route, Diagnostic> ActionItem for DiagnosticAction<Route, Diagnostic>
where Route: DiagnosticRoute<Diagnostic>, Diagnostic: Send,

Source§

type Custody = (Option<DiagnosticAction<Route, Diagnostic>>, Option<<DiagnosticAction<Route, Diagnostic> as ActionItem>::Reply>)

Source§

type Input<'a> = &'a mut Option<DiagnosticAction<Route, Diagnostic>> where Self: 'a

Source§

type Reply = ItemSettlement<DiagnosticAction<Route, Diagnostic>, <DiagnosticAction<Route, Diagnostic> as ActionItem>::Accepted, <DiagnosticAction<Route, Diagnostic> as ActionItem>::Rejection, <DiagnosticAction<Route, Diagnostic> as ActionItem>::Prerequisite>

Source§

type Accepted = DiagnosticAccepted<Diagnostic>

Source§

type Rejection = <Route as DiagnosticRoute<Diagnostic>>::Rejection

Source§

type Prerequisite = Never

Source§

fn prepare_interpretation( progress: &mut Option<InterpretationProgress<Self, Self::Custody, Self::Reply>>, )

Source§

fn interpretation_input<'a>( custody: &'a mut Self::Custody, ) -> Option<(Self::Input<'a>, &'a mut Option<Self::Reply>)>
where Self: 'a,

Source§

fn finish_interpretation( progress: &mut Option<InterpretationProgress<Self, Self::Custody, Self::Reply>>, )

Source§

fn retain_accepted(accepted: Self::Accepted) -> Option<Self::Accepted>

Keep an accepted value only while it still carries terminal custody. Read more
Source§

impl<Route, Diagnostic> InterpreterRequest for DiagnosticAction<Route, Diagnostic>
where Route: DiagnosticRoute<Diagnostic>,

Auto Trait Implementations§

§

impl<Route, Diagnostic> Freeze for DiagnosticAction<Route, Diagnostic>
where Route: Freeze, Diagnostic: Freeze,

§

impl<Route, Diagnostic> RefUnwindSafe for DiagnosticAction<Route, Diagnostic>
where Route: RefUnwindSafe, Diagnostic: RefUnwindSafe,

§

impl<Route, Diagnostic> Send for DiagnosticAction<Route, Diagnostic>
where Route: Send, Diagnostic: Send,

§

impl<Route, Diagnostic> Sync for DiagnosticAction<Route, Diagnostic>
where Route: Sync, Diagnostic: Sync,

§

impl<Route, Diagnostic> Unpin for DiagnosticAction<Route, Diagnostic>
where Route: Unpin, Diagnostic: Unpin,

§

impl<Route, Diagnostic> UnsafeUnpin for DiagnosticAction<Route, Diagnostic>
where Route: UnsafeUnpin, Diagnostic: UnsafeUnpin,

§

impl<Route, Diagnostic> UnwindSafe for DiagnosticAction<Route, Diagnostic>
where Route: UnwindSafe, Diagnostic: UnwindSafe,

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.