Skip to main content

AuditMode

Enum AuditMode 

Source
#[non_exhaustive]
pub enum AuditMode { Full, Last(usize), Off, }
Expand description

How many AuditTrail entries a Message keeps.

The engine records one entry per executed task, and in a looping workflow that is one per task per sweep, all kept until process_message returns. A host that never reads Message::audit_trail (because it traces, or reads metadata.progress) can bound or drop them. Set it with MessageBuilder::audit_mode.

The mode changes only what is kept. Status classification, error records, metadata.progress, halting and the observer are identical in every mode.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Full

Keep every entry. The default.

§

Last(usize)

Keep the most recent n entries. Last(0) keeps none, like Self::Off.

Older entries are dropped in batches, so the message holds at most 2n entries in memory while Message::audit_trail always shows the last n.

§

Off

Keep no entries.

A trace’s per-step changes are read from the task’s own entry, so they come back empty in this mode, as they do with capture_changes off. Turn capture_changes off too: with no entry to hold them, the captured copies would be made and dropped for nothing.

Trait Implementations§

Source§

impl Clone for AuditMode

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for AuditMode

Source§

impl Debug for AuditMode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for AuditMode

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for AuditMode

Source§

impl PartialEq for AuditMode

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for AuditMode

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.