#[non_exhaustive]pub enum ApiError {
NotFound(u32),
NotATask(u32, Kind),
NotADecision(u32, Kind),
Empty(&'static str),
SelfLink(u32),
NoComment(u32, usize),
NoRepo(String),
NotFoundIn(RepoLink),
DoingFull(u32),
NoTag(String),
}Expand description
Why an operation by id was refused, as the CLI prints it.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NotFound(u32)
No entry has this id.
NotATask(u32, Kind)
Only tasks have a status; this entry is a note or decision.
NotADecision(u32, Kind)
Only decisions are accepted or rejected; this entry is a task or note.
Empty(&'static str)
A title, comment or description that is empty once trimmed.
SelfLink(u32)
A link from an entry to itself.
NoComment(u32, usize)
The entry has no comment at this index (counting from 0).
NoRepo(String)
A link to a repository that isn’t another one of this brain’s project, or can’t be read.
NotFoundIn(RepoLink)
A link to an entry that the other repository doesn’t have.
DoingFull(u32)
A person starting a task while doing holds the one a person started: its id.
NoTag(String)
No entry has this tag.
Trait Implementations§
impl Eq for ApiError
Source§impl Error for ApiError
impl Error for ApiError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
impl StructuralPartialEq for ApiError
Auto Trait Implementations§
impl Freeze for ApiError
impl RefUnwindSafe for ApiError
impl Send for ApiError
impl Sync for ApiError
impl Unpin for ApiError
impl UnsafeUnpin for ApiError
impl UnwindSafe for ApiError
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.