Skip to main content

TixError

Enum TixError 

Source
pub enum TixError {
    Io(Error),
    Workflow(WorkflowDiagnostic),
    Config(String),
    Parse(String),
    NotFound(String),
    InvalidInput(String),
    Refused(String),
    Editor(String),
    External(String),
    Kitty(String),
}
Expand description

Typed errors raised by tix.

Variants§

§

Io(Error)

An I/O operation failed (read/write/rename/remove).

§

Workflow(WorkflowDiagnostic)

The transition service refused a status change (contract §3.5).

WP03. Carries the diagnostic, not a pre-formatted string, so the named kind reaches the surface intact: the CLI, the TUI, MCP and lint all report one condition under one name (contract §6). A refusal that arrives as a bare InvalidInput would be indistinguishable from a typo caught by argument parsing, and the caller could not tell “you asked for a column that does not exist” from “that move is against policy”.

Reaching this variant is itself the contract: nothing was written — no issue file, no tix.toml, no History entry. The seam guarantees it.

§

Config(String)

tix.toml or other config surface is invalid.

§

Parse(String)

A data file (issue frontmatter, config) could not be parsed.

§

NotFound(String)

The requested issue/config path does not exist.

§

InvalidInput(String)

User input failed validation.

§

Refused(String)

A validation refusal whose findings are already a rendered block.

render_diagnostics renders the service’s findings through crate::diagnostics, so by the time they reach an error they are a rustc-style block, not a bare message. Wrapping that in the invalid input: prefix would put a second, non-rustc prefix in front of a rustc block — so this variant prints its payload verbatim (#[error("{0}")]), and render_error returns it unchanged.

§

Editor(String)

Launching or interacting with the $EDITOR failed.

§

External(String)

An external tool (glab, linear-cli, …) failed.

§

Kitty(String)

Spec Kitty bridge error (kitty-specs/ read, parse, or link).

Implementations§

Source§

impl TixError

Source

pub fn diagnostic_id(&self) -> &'static str

The stable rendering id for this error, used by render_error.

One id per variant, so the CLI, MCP, and the TUI all bracket the same condition with the same name. Refused has no id of its own — its payload already carries one.

Source

pub fn with_path(self, path: impl Display) -> Self

Wrap an error with a path prefix for context.

Trait Implementations§

Source§

impl Debug for TixError

Source§

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

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

impl Display for TixError

Source§

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

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

impl Error for TixError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<EpicError> for TixError

An epic refusal becomes user input error, so ? works at the call site.

The payload is a single-line diagnostic (<kind>: <message>), so it takes the crate’s existing invalid input: prefix without doubling it — the same boundary every other selector/validation refusal crosses (cli-surface §6).

Source§

fn from(err: EpicError) -> TixError

Converts to this type from the input type.
Source§

impl From<Error> for TixError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<HierarchyError> for TixError

A hierarchy refusal becomes user input error, so ? works at the call site.

The conversion is total and lossless: the type’s own Display already renders the full diagnostic set, and InvalidInput supplies the invalid input: prefix every other validation failure in the crate carries.

Source§

fn from(err: HierarchyError) -> TixError

Converts to this type from the input type.
Source§

impl From<ProjectError> for TixError

A project refusal becomes user input error, so ? works at the call site.

The payload is a single-line diagnostic (<kind>: <message>), so it takes the crate’s existing invalid input: prefix without doubling it — the same boundary every other selector/validation refusal crosses (cli-surface §6).

Source§

fn from(err: ProjectError) -> TixError

Converts to this type from the input type.
Source§

impl From<Refusal> for TixError

Source§

fn from(refusal: Refusal) -> Self

A refusal becomes a rendered block: the one place a refusal is turned into something a surface prints, so its rustc-style header is produced exactly once, here, rather than by every caller that happens to to_string() it.

Source§

impl From<RuleError> for TixError

A rule refusal becomes a rendered error at the surface, like every other validation refusal (crate::error::TixError::Refused).

Source§

fn from(err: RuleError) -> TixError

Converts to this type from the input type.
Source§

impl From<TimeMutationError> for TixError

A refusal becomes user input error, so ? works at the call site.

<kind>: <message> is already a single-line diagnostic, so it takes the crate’s existing invalid input: prefix without doubling it — the same boundary crate::projects::ProjectError crosses.

Source§

fn from(err: TimeMutationError) -> TixError

Converts to this type from the input type.
Source§

impl From<TixError> for TemplateWriteError

Source§

fn from(error: TixError) -> Self

A bare error from the registry is a refusal by default: the registry’s failures are all validation, and the save path maps its own error to TemplateWriteError::Failed explicitly.

Source§

impl From<TixError> for ViewWriteError

Source§

fn from(error: TixError) -> Self

Converts to this type from the input type.

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

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> ToCompactString for T
where T: Display,

Source§

impl<T> ToLine for T
where T: Display,

Source§

fn to_line(&self) -> Line<'_>

Converts the value to a Line.
Source§

impl<T> ToSpan for T
where T: Display,

Source§

fn to_span(&self) -> Span<'_>

Converts the value to a Span.
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T> ToText for T
where T: Display,

Source§

fn to_text(&self) -> Text<'_>

Converts the value to a Text.
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.