Skip to content

error

Structs

  • EditorExitStatus - Exit status from an editor process that started successfully.
  • ErrorMessage - Stored display text for an error that came from another layer.

Enums


firma_tui::control::error::AuditSourceError

Section titled “firma_tui::control::error::AuditSourceError”

Enum

Failures while connecting to or translating the audit source.

Variants:

  • ResolvePath{ source: ErrorMessage } - The audit log path could not be resolved from config or state.
  • TailerStopped - The audit tailing worker stopped unexpectedly.
  • ForwarderStopped - The audit forwarding worker stopped unexpectedly.
  • ParseLine{ source: ErrorMessage } - One audit log line could not be translated.
  • Operation{ message: String } - Generic audit source failure.

Methods:

  • fn operation<impl Into<String>>(message: impl Trait) -> Self - Creates a generic audit source failure.

Traits: Eq

Trait Implementations:

  • From
    • fn from(message: String) -> Self
  • PartialEq
    • fn eq(self: &Self, other: &AuditSourceError) -> bool
  • Display
    • fn fmt(self: &Self, __formatter: & mut ::core::fmt::Formatter) -> ::core::fmt::Result
  • Debug
    • fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
  • From
    • fn from(message: &str) -> Self
  • Error
    • fn source(self: &Self) -> ::core::option::Option<&dyn ::thiserror::__private18::Error>
  • Clone
    • fn clone(self: &Self) -> AuditSourceError

Enum

Error value stored in UI state and status snapshots.

Variants:

  • Runtime{ error: Box<RuntimeError> } - Runtime-level UI failure.
  • PolicyDiscovery{ path: std::path::PathBuf, error: Box<PolicyDiscoveryError> } - Policy discovery failed for the given policy directory.
  • PolicyRewrite{ path: std::path::PathBuf, ids: Vec<String>, count: usize, error: Box<PolicyRewriteError> } - Policy rewrite failed for one or more rows in the same source file.
  • Editor{ path: std::path::PathBuf, error: Box<EditorError> } - External editor failed while opening a policy source file.
  • AuditSource{ error: Box<AuditSourceError> } - Audit-source setup or forwarding failed.

Methods:

  • fn runtime<impl Into<String>>(message: impl Trait) -> Self - Creates a runtime-level UI failure.
  • fn policy_rewrite<impl Into<PathBuf>>(path: impl Trait, ids: Vec<String>, error: PolicyRewriteError) -> Self - Creates a policy rewrite failure and records the number of affected rows.
  • fn audit_source<impl Into<AuditSourceError>>(error: impl Trait) -> Self - Creates an audit-source failure.
  • fn path(self: &Self) -> Option<&Path> - File path most closely associated with the error, when one exists.
  • fn message(self: &Self) -> String - Short message suitable for status display.

Traits: Error, Eq

Trait Implementations:

  • Debug
    • fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
  • PartialEq
    • fn eq(self: &Self, other: &ControlError) -> bool
  • Display
    • fn fmt(self: &Self, __formatter: & mut ::core::fmt::Formatter) -> ::core::fmt::Result
  • Clone
    • fn clone(self: &Self) -> ControlError

Enum

Variants:

  • PendingRewrite - Editing is blocked while a policy rewrite is still pending.
  • Launch{ source: EditorProcessError } - The editor process could not be started.
  • Exit{ status: EditorExitStatus } - The editor process ran and returned an unsuccessful status.
  • Operation{ message: String } - Generic editor operation failure with a user-facing message.

Methods:

  • fn operation<impl Into<String>>(message: impl Trait) -> Self - Creates a generic editor operation failure.

Traits: Eq

Trait Implementations:

  • Debug
    • fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
  • Error
    • fn source(self: &Self) -> ::core::option::Option<&dyn ::thiserror::__private18::Error>
  • Clone
    • fn clone(self: &Self) -> EditorError
  • PartialEq
    • fn eq(self: &Self, other: &EditorError) -> bool
  • Display
    • fn fmt(self: &Self, __formatter: & mut ::core::fmt::Formatter) -> ::core::fmt::Result

firma_tui::control::error::EditorExitStatus

Section titled “firma_tui::control::error::EditorExitStatus”

Struct

Exit status from an editor process that started successfully.

Launch errors are modeled separately as [EditorProcessError]. This value only carries the status reported by a process that actually ran.

Methods:

  • fn new<impl Into<String>>(status: impl Trait) -> Self - Creates an editor exit status from its rendered process status.
  • fn as_str(self: &Self) -> &str - Returns the rendered process status.

Traits: Eq

Trait Implementations:

  • PartialEq
    • fn eq(self: &Self, other: &EditorExitStatus) -> bool
  • Debug
    • fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
  • Display
    • fn fmt(self: &Self, formatter: & mut fmt::Formatter) -> fmt::Result
  • Clone
    • fn clone(self: &Self) -> EditorExitStatus

firma_tui::control::error::EditorProcessError

Section titled “firma_tui::control::error::EditorProcessError”

Enum

Error produced before an editor process starts running.

Once the process has started, an unsuccessful exit is reported as [EditorError::Exit] instead.

Variants:

  • Start{ source: ErrorMessage } - The configured editor command could not be spawned.

Traits: Eq

Trait Implementations:

  • PartialEq
    • fn eq(self: &Self, other: &EditorProcessError) -> bool
  • Display
    • fn fmt(self: &Self, __formatter: & mut ::core::fmt::Formatter) -> ::core::fmt::Result
  • Debug
    • fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
  • Error
    • fn source(self: &Self) -> ::core::option::Option<&dyn ::thiserror::__private18::Error>
  • Clone
    • fn clone(self: &Self) -> EditorProcessError

Struct

Stored display text for an error that came from another layer.

Status values need to be cloned and compared while the TUI is running. Many source errors do not support that, so this captures their message at the boundary where the richer error type is no longer needed.

Methods:

  • fn new<impl Into<String>>(message: impl Trait) -> Self - Creates an error message from text.
  • fn capture<impl fmt::Display>(error: impl Trait) -> Self - Captures the display text of another error.

Traits: Eq, Error

Trait Implementations:

  • Clone
    • fn clone(self: &Self) -> ErrorMessage
  • PartialEq
    • fn eq(self: &Self, other: &ErrorMessage) -> bool
  • Display
    • fn fmt(self: &Self, __formatter: & mut ::core::fmt::Formatter) -> ::core::fmt::Result
  • Debug
    • fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result

firma_tui::control::error::PolicyDiscoveryError

Section titled “firma_tui::control::error::PolicyDiscoveryError”

Enum

Variants:

  • MissingDirectory{ path: std::path::PathBuf }
  • ReadDirectory{ path: std::path::PathBuf, source: ErrorMessage }
  • ReadFile{ path: std::path::PathBuf, source: ErrorMessage }
  • ParseFile{ path: std::path::PathBuf, source: ErrorMessage }
  • EmptyId{ path: std::path::PathBuf }
  • DuplicateId{ id: String }

Traits: Eq

Trait Implementations:

  • Error
    • fn source(self: &Self) -> ::core::option::Option<&dyn ::thiserror::__private18::Error>
  • Clone
    • fn clone(self: &Self) -> PolicyDiscoveryError
  • PartialEq
    • fn eq(self: &Self, other: &PolicyDiscoveryError) -> bool
  • Display
    • fn fmt(self: &Self, __formatter: & mut ::core::fmt::Formatter) -> ::core::fmt::Result
  • Debug
    • fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result

firma_tui::control::error::PolicyRewriteError

Section titled “firma_tui::control::error::PolicyRewriteError”

Enum

Variants:

  • InvalidRequestedState
  • ReadFile{ path: std::path::PathBuf, source: ErrorMessage }
  • ParseSource{ source: ErrorMessage }
  • InvalidPolicyAnnotationKey{ key: String, source: ErrorMessage }
  • DuplicatePolicyId{ id: String }
  • MissingSourceSpan{ id: String }
  • InvalidPolicySourceSpan{ id: String }
  • ManagedConditionOutsidePolicy{ id: String }
  • EmptyPolicySourceSpan
  • PolicySourceSpanMissingSemicolon
  • UnattachedManagedCondition
  • MissingId{ id: String }
  • DuplicateRequestedId{ id: String }
  • SourceSpanOutsideSource
  • ParseCst{ source: ErrorMessage }
  • EmptyCst
  • MissingCstPolicy{ id: String }
  • MissingGeneratedPolicy{ id: String }
  • InvalidCandidate{ path: std::path::PathBuf, source: ErrorMessage }
  • MissingParentDir{ path: std::path::PathBuf }
  • CreateTempFile{ path: std::path::PathBuf, source: ErrorMessage }
  • WriteTempFile{ path: std::path::PathBuf, source: ErrorMessage }
  • SyncTempFile{ path: std::path::PathBuf, source: ErrorMessage }
  • AtomicReplace{ path: std::path::PathBuf, temp_path: std::path::PathBuf, source: ErrorMessage }
  • StateMismatch{ requested: crate::control::toggle::PolicyState }
  • Operation{ message: String }

Methods:

  • fn operation<impl Into<String>>(message: impl Trait) -> Self

Traits: Eq

Trait Implementations:

  • PartialEq
    • fn eq(self: &Self, other: &PolicyRewriteError) -> bool
  • Display
    • fn fmt(self: &Self, __formatter: & mut ::core::fmt::Formatter) -> ::core::fmt::Result
  • Debug
    • fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
  • Error
    • fn source(self: &Self) -> ::core::option::Option<&dyn ::thiserror::__private18::Error>
  • Clone
    • fn clone(self: &Self) -> PolicyRewriteError

firma_tui::control::error::RewriteEventProbeError

Section titled “firma_tui::control::error::RewriteEventProbeError”

Enum

Error returned while waiting on a rewrite event probe.

Variants:

  • Timeout{ timeout: std::time::Duration } - The expected event was not observed before the wait budget expired.
  • Disconnected - The rewrite worker side of the probe was dropped before completion.

Traits: Error

Trait Implementations:

  • Debug
    • fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
  • Display
    • fn fmt(self: &Self, __formatter: & mut ::core::fmt::Formatter) -> ::core::fmt::Result

Enum

Variants:

  • Operation{ message: String } - Generic runtime failure with a user-facing message.

Methods:

  • fn operation<impl Into<String>>(message: impl Trait) -> Self - Creates a generic runtime failure.

Traits: Error, Eq

Trait Implementations:

  • Debug
    • fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
  • PartialEq
    • fn eq(self: &Self, other: &RuntimeError) -> bool
  • Display
    • fn fmt(self: &Self, __formatter: & mut ::core::fmt::Formatter) -> ::core::fmt::Result
  • Clone
    • fn clone(self: &Self) -> RuntimeError