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.
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.
TemplateUnreadable
Cannot read template file as body text.
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
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.
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).
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.
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.
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
NotInitialized
Board is uninitialized (.pinto/ is missing).
Io
File I/O failed.
Parse
Frontmatter or body parsing failed.
MissingFrontmatter
Frontmatter delimiter (+++) is missing.
UnsupportedSqliteSchema
The SQLite database uses a schema version this build does not understand.
Fields
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.
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
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.
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.
Implementations§
Source§impl Error
impl Error
Sourcepub const fn code(&self) -> &'static str
pub const fn code(&self) -> &'static str
Return the stable machine-facing code for this error variant.
Sourcepub fn localized(&self, localizer: &Localizer) -> String
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.
Sourcepub fn is_user_error(&self) -> bool
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§
impl Eq for Error
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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