pub enum PlanError {
InvalidTitle {
reason: &'static str,
},
ContentTooLarge {
actual: usize,
maximum: usize,
},
EmptyFeedback,
UnknownPlan {
plan_id: PlanId,
},
PlanNotEditable {
plan_id: PlanId,
status: PlanDocumentStatus,
},
TooManyPlans {
maximum: usize,
},
InvalidFileName {
file_name: String,
},
}Expand description
Typed errors returned by Plan Mode state transitions and document authoring.
Variants§
InvalidTitle
Plan title is blank, too long, or contains control characters.
ContentTooLarge
Plan Markdown body exceeds the bounded size limit.
EmptyFeedback
Plan feedback is blank when requesting revisions.
UnknownPlan
Referenced plan id does not exist in this session.
PlanNotEditable
Attempted to overwrite a plan that is already approved or abandoned.
TooManyPlans
Session reached the bounded maximum number of stored plans.
InvalidFileName
Sanitized plan file name failed safety validation.
Trait Implementations§
impl Eq for PlanError
Source§impl Error for PlanError
impl Error for PlanError
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()
Source§impl From<PlanError> for RuntimeError
impl From<PlanError> for RuntimeError
Source§impl From<PlanError> for InteractiveError
impl From<PlanError> for InteractiveError
impl StructuralPartialEq for PlanError
Auto Trait Implementations§
impl Forget for PlanError
impl Freeze for PlanError
impl Move for PlanError
impl RefUnwindSafe for PlanError
impl Send for PlanError
impl Sync for PlanError
impl Unpin for PlanError
impl UnsafeUnpin for PlanError
impl UnwindSafe for PlanError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.