Skip to main content

OutputEvent

Enum OutputEvent 

Source
pub enum OutputEvent {
Show 25 variants IgnoredInitScript { path: PathBuf, }, WouldRunInitScript { path: PathBuf, root_path: PathBuf, }, RunInitScript { path: PathBuf, }, NoConfigDetected, RootWorktreeDetected, ConfigDetected { path: PathBuf, }, FileOperationPlanningStarted { operation: FileOperationKind, source: PathBuf, target: PathBuf, }, FileOperationPlanningFinished { operation: FileOperationKind, source: PathBuf, target: PathBuf, action_count: usize, }, FileOperationExecutionStarted { operation: FileOperationKind, source: PathBuf, target: PathBuf, action_count: usize, }, FileOperationActionAdvanced { operation: FileOperationKind, source: PathBuf, target: PathBuf, }, FileOperationFinished { operation: FileOperationKind, source: PathBuf, target: PathBuf, summary: FileOperationSummary, dry_run: bool, }, FileApplied { operation: FileOperationKind, source: PathBuf, target: PathBuf, }, FileWouldApply { operation: FileOperationKind, source: PathBuf, target: PathBuf, }, FileMetadataApplied { source: PathBuf, target: PathBuf, }, FileMetadataWouldApply { source: PathBuf, target: PathBuf, }, FileSkipped { operation: FileOperationKind, target: PathBuf, reason: String, }, FileWouldSkip { operation: FileOperationKind, target: PathBuf, reason: String, }, FileDeleted { path: PathBuf, }, FileWouldDelete { path: PathBuf, }, FileWarning { path: PathBuf, reason: String, }, OwnershipWarning { path: PathBuf, reason: String, }, CommandStarted { label: String, }, CommandWouldRun { label: String, }, CommandAllowedFailure { label: String, reason: String, }, InitCreated { path: PathBuf, },
}
Expand description

A structured message produced during a treeboot operation.

Variants§

§

IgnoredInitScript

A non-executable script candidate was ignored.

Fields

§path: PathBuf

Script candidate path.

§

WouldRunInitScript

A dry run would execute the given init script.

Fields

§path: PathBuf

Script path.

§root_path: PathBuf

Root checkout path passed as the script argument.

§

RunInitScript

An init script is about to run.

Fields

§path: PathBuf

Script path.

§

NoConfigDetected

No script or config was found.

§

RootWorktreeDetected

The run started from the root checkout instead of a separate worktree.

§

ConfigDetected

A config file was found.

Fields

§path: PathBuf

Config file path.

§

FileOperationPlanningStarted

Planning started for a top-level file operation.

Fields

§operation: FileOperationKind

File operation kind.

§source: PathBuf

Display source path.

§target: PathBuf

Display target path.

§

FileOperationPlanningFinished

Planning finished for a top-level file operation.

Fields

§operation: FileOperationKind

File operation kind.

§source: PathBuf

Display source path.

§target: PathBuf

Display target path.

§action_count: usize

Number of progress-visible actions in the operation.

§

FileOperationExecutionStarted

Execution started for a top-level file operation.

Fields

§operation: FileOperationKind

File operation kind.

§source: PathBuf

Display source path.

§target: PathBuf

Display target path.

§action_count: usize

Number of progress-visible actions in the operation.

§

FileOperationActionAdvanced

One concrete file-operation action completed.

Fields

§operation: FileOperationKind

File operation kind.

§source: PathBuf

Display source path.

§target: PathBuf

Display target path.

§

FileOperationFinished

A top-level file operation finished.

Fields

§operation: FileOperationKind

File operation kind.

§source: PathBuf

Display source path.

§target: PathBuf

Display target path.

§summary: FileOperationSummary

Compact counts for the operation.

§dry_run: bool

Whether the operation was a dry run.

§

FileApplied

A file operation was applied.

Fields

§operation: FileOperationKind

File operation kind.

§source: PathBuf

Display source path.

§target: PathBuf

Display target path.

§

FileWouldApply

A dry run would apply a file operation.

Fields

§operation: FileOperationKind

File operation kind.

§source: PathBuf

Display source path.

§target: PathBuf

Display target path.

§

FileMetadataApplied

A sync operation applied metadata-only changes.

Fields

§source: PathBuf

Display source path.

§target: PathBuf

Display target path.

§

FileMetadataWouldApply

A dry run would apply metadata-only sync changes.

Fields

§source: PathBuf

Display source path.

§target: PathBuf

Display target path.

§

FileSkipped

A file operation was skipped.

Fields

§operation: FileOperationKind

File operation kind.

§target: PathBuf

Display target path.

§reason: String

Reason the operation was skipped.

§

FileWouldSkip

A dry run would skip a file operation.

Fields

§operation: FileOperationKind

File operation kind.

§target: PathBuf

Display target path.

§reason: String

Reason the operation would be skipped.

§

FileDeleted

A sync operation deleted a target-only path.

Fields

§path: PathBuf

Deleted path.

§

FileWouldDelete

A dry-run sync operation would delete a target-only path.

Fields

§path: PathBuf

Path that would be deleted.

§

FileWarning

A file operation warning was produced.

Fields

§path: PathBuf

Warning path.

§reason: String

Human-readable warning detail.

§

OwnershipWarning

Ownership metadata could not be preserved.

Fields

§path: PathBuf

Warning path.

§reason: String

Human-readable warning detail.

§

CommandStarted

A command is about to run.

Fields

§label: String

Human-readable command label.

§

CommandWouldRun

A dry run would execute a command.

Fields

§label: String

Human-readable command label.

§

CommandAllowedFailure

A command failure was allowed and execution will continue.

Fields

§label: String

Human-readable command label.

§reason: String

Failure detail.

§

InitCreated

An init file was created.

Fields

§path: PathBuf

Created file path.

Implementations§

Source§

impl OutputEvent

Source

pub fn message(&self) -> String

Formats the event as a user-facing line.

Structured lifecycle events used only to drive presentation state return an empty string because they do not have a durable text-line form.

Trait Implementations§

Source§

impl Clone for OutputEvent

Source§

fn clone(&self) -> OutputEvent

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 Debug for OutputEvent

Source§

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

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

impl Eq for OutputEvent

Source§

impl PartialEq for OutputEvent

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for OutputEvent

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> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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 = 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.