Skip to main content

Error

Enum Error 

Source
pub enum Error {
Show 46 variants InvalidItemId(String), InvalidRank(String), InvalidAutomationPlan, AutomationPlanSource { path: PathBuf, message: String, }, UnknownStatus(String), EmptyTitle, InvalidSearchPattern(String), InvalidFilterOption(String), NothingToUpdate, EmptyDod, InvalidTemplateName(String), TemplateNotFound { kind: &'static str, name: TemplateName, path: PathBuf, }, TemplateUnreadable { path: PathBuf, message: String, }, NotFound(ItemId), ReferencedItem { item: ItemId, references: String, }, InvalidSprintId(String), InvalidSprintState(String), EmptySprintTitle, EmptySprintGoal, InvalidSprintTransition { from: SprintState, to: SprintState, }, SprintNotFound(SprintId), SprintExists(SprintId), SprintClosed(SprintId), InvalidSprintPeriod { start: NaiveDate, end: NaiveDate, }, InvalidDailyWorkHours(String), InvalidDeductionFactor(String), InvalidSprintHolidays { holidays: u32, calendar_days: u32, }, SprintCapacityPeriodUnset(SprintId), SprintCapacityUnset(SprintId), SprintPeriodUnset(SprintId), SprintEmpty(SprintId), NotInSprint { item: ItemId, sprint: SprintId, }, ParentCycle { child: ItemId, parent: ItemId, }, NotInitialized { path: PathBuf, }, Io { path: PathBuf, message: String, }, Parse { path: PathBuf, message: String, }, MissingFrontmatter { path: PathBuf, }, UnsupportedSqliteSchema { path: PathBuf, found: String, supported: u32, }, SelfReference(ItemId), NotSibling { item: ItemId, reference: ItemId, }, Task(String), Git(String), EditorNotSet, EditorLaunch { editor: String, message: String, }, EditorInvalid { message: String, }, Locked { path: PathBuf, },
}
Expand description

Errors returned by pinto’s domain, service, and persistence layers.

Variants§

§

InvalidItemId(String)

PBI ID format is invalid (expected an ASCII-letter prefix and decimal number).

§

InvalidRank(String)

Invalid rank string (expected non-empty base-36 alphanumeric 0-9a-z).

§

InvalidAutomationPlan

The automation plan is malformed or contains a command that is not permitted.

§

AutomationPlanSource

A plan file or standard-input source could not be read.

Fields

§path: PathBuf
§message: String
§

UnknownStatus(String)

The transition destination does not exist in the workflow column.

§

EmptyTitle

Title is empty.

§

InvalidSearchPattern(String)

Search pattern is invalid.

§

InvalidFilterOption(String)

A filter option was used without the value required by its display mode.

§

NothingToUpdate

No fields were specified to update (empty update of edit).

§

EmptyDod

An attempt was made to set an empty string (only spaces) to the common DoD.

§

InvalidTemplateName(String)

Template name cannot be used as a safe file name.

§

TemplateNotFound

The specified template file does not exist.

Fields

§kind: &'static str
§path: PathBuf
§

TemplateUnreadable

Cannot read template file as body text.

Fields

§path: PathBuf
§message: String
§

NotFound(ItemId)

No backlog item exists with the specified ID.

§

ReferencedItem

The PBI cannot be physically deleted because active PBIs still refer to it.

Fields

§item: ItemId

PBI targeted for permanent deletion.

§references: String

IDs of active PBIs that refer to item.

§

InvalidSprintId(String)

The sprint ID is malformed; it must contain one or more ASCII letters, digits, -, or _.

§

InvalidSprintState(String)

Invalid sprint status string (expected planned / active / closed).

§

EmptySprintTitle

Sprint title is empty.

§

EmptySprintGoal

Sprint goal is required before starting a sprint.

§

InvalidSprintTransition

The sprint state transition is invalid; only planned → active → closed is allowed.

Fields

§from: SprintState

Current state.

§to: SprintState

The state to transition to.

§

SprintNotFound(SprintId)

A sprint with the specified ID cannot be found.

§

SprintExists(SprintId)

A sprint with the requested ID already exists.

Creating a sprint never overwrites an existing sprint. Use edit/remove to manage the existing record, or start/close to advance its state.

§

SprintClosed(SprintId)

A PBI cannot be assigned to a Sprint after that Sprint has been closed.

§

InvalidSprintPeriod

The planned sprint date is incorrect (start later than end).

Fields

§start: NaiveDate

Planned start date.

§end: NaiveDate

Planned end date.

§

InvalidDailyWorkHours(String)

The number of working hours per day is not a finite number greater than or equal to 0.

§

InvalidDeductionFactor(String)

The deduction rate is not in the range of 0 to 1.

§

InvalidSprintHolidays

The specified number of holidays exceeds the number of days in the sprint period.

Fields

§holidays: u32
§calendar_days: u32
§

SprintCapacityPeriodUnset(SprintId)

The sprint period required for capacity setting has not been set.

§

SprintCapacityUnset(SprintId)

Capacity setting is not set.

§

SprintPeriodUnset(SprintId)

Planned dates (start and end) are not set for the sprint (burndown period cannot be determined).

§

SprintEmpty(SprintId)

No PBIs are assigned to the sprint (no burndown target).

§

NotInSprint

The backlog item is not assigned to the specified sprint.

Fields

§item: ItemId

Target PBI.

§sprint: SprintId

The sprint you tried to unassign.

§

ParentCycle

A parent link would create a cycle by assigning the item to itself or one of its descendants.

Parent-child links must remain acyclic so that the hierarchy stays a tree. Dependency links (depends_on) have separate cycle handling and are not rejected by this variant.

Fields

§child: ItemId

PBI attempting to set parent.

§parent: ItemId

Proposed parent; assigning it would create a cycle.

§

NotInitialized

Board is uninitialized (.pinto/ is missing).

Fields

§path: PathBuf

The expected path of .pinto/.

§

Io

File I/O failed.

Fields

§path: PathBuf

Target path.

§message: String

Message returned by the OS.

§

Parse

Frontmatter or body parsing failed.

Fields

§path: PathBuf

Target path.

§message: String

The message returned by the parser.

§

MissingFrontmatter

Frontmatter delimiter (+++) is missing.

Fields

§path: PathBuf

Target path.

§

UnsupportedSqliteSchema

The SQLite database uses a schema version this build does not understand.

Fields

§path: PathBuf

SQLite database path.

§found: String

Raw value stored in the schema metadata.

§supported: u32

Only schema version currently understood by this build.

§

SelfReference(ItemId)

The reorder reference is the same item (reorder <id> --before/--after <id> use one ID).

An item cannot be moved relative to itself.

§

NotSibling

reorder <item> --before/--after <reference> names a reference that is not a sibling of item (different parent or different column).

Reorder only changes order within a sibling group (same parent and same status); use edit --parent to move an item between groups.

Fields

§item: ItemId
§reference: ItemId
§

Task(String)

Execution of a parallel I/O task failed (internal error such as panic).

§

Git(String)

Git backend operation failed (git absent, command failure, etc.).

For example, if git is not on PATH, install Git or set [storage] backend = "file".

§

EditorNotSet

Neither $EDITOR nor $VISUAL is set, so editing cannot start.

Set one of those environment variables or provide the content directly with --body.

§

EditorLaunch

The configured editor failed to start or terminate normally.

Fields

§editor: String

The command selected from $VISUAL or $EDITOR.

§message: String

OS startup error or editor exit status.

§

EditorInvalid

The edited content is invalid and cannot be applied to the backlog item.

This includes syntax errors and empty frontmatter titles. The original item remains unchanged; correct the content and try again.

Fields

§message: String

The reason the parser/validator returned.

§

Locked

Another process was holding the board lock (.pinto/.lock) and the write could not be serialized.

An advisory lock prevents simultaneous writes from losing updates through last-writer-wins behavior. The usual remedy is to wait for the other process. If a crash leaves the lock file behind, confirm that no pinto process is running and remove the file manually.

Fields

§path: PathBuf

Path of the lock file (.pinto/.lock) that could not be obtained.

Implementations§

Source§

impl Error

Source

pub const fn code(&self) -> &'static str

Return the stable machine-facing code for this error variant.

Source

pub fn localized(&self, localizer: &Localizer) -> String

Render this error through the selected locale for CLI/TUI boundaries.

Values originating in the operating system, Git, TOML, or another parser are passed to the catalog unchanged. They are intentionally not translated because their exact wording is the actionable diagnostic users need when repairing an external condition. The Display implementation generated by thiserror remains the English fallback for library consumers that do not have a locale boundary.

Source

pub fn is_user_error(&self) -> bool

Is this error caused by the user (bad input or a missing target)?

The CLI maps user-fixable errors to exit code 1 and unexpected I/O or task failures to code 2. Add any new user-facing variant here so the classification stays in one place and no subcommand has to repeat it.

Trait Implementations§

Source§

impl Debug for Error

Source§

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

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

impl Display for Error

Source§

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

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

impl Eq for Error

Source§

impl Error for Error

1.30.0 · 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 PartialEq for Error

Source§

fn eq(&self, other: &Error) -> 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 Error

Auto Trait Implementations§

§

impl Freeze for Error

§

impl RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl UnsafeUnpin for Error

§

impl UnwindSafe for Error

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> AnyEq for T
where T: Any + PartialEq,

Source§

fn equals(&self, other: &(dyn Any + 'static)) -> bool

Source§

fn as_any(&self) -> &(dyn Any + 'static)

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> 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> 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, 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.