Skip to main content

PlanError

Struct PlanError 

Source
pub struct PlanError { /* private fields */ }
Expand description

How planning says no.

Planning issues are independent and co-establishable — one pass may find a doubled seat and an overrun magnitude at once — so the body carries every issue the pass established, and says so where it kept only what fits. No issue is elected as the primary one, and a body with nothing in it is unrepresentable.

Implementations§

Source§

impl PlanError

Source

pub fn of(issue: PlanIssue) -> Self

The refusal one established issue makes.

Source

pub fn over(first: PlanIssue, rest: Vec<PlanIssue>) -> Self

The refusal a pass whose checks co-establish makes.

The caller arrives holding every issue its pass established, so the posture the body writes is about the REPORT and never about the pass: where the issues fit it carries all of them, and where they do not it carries what fits and counts the rest.

Source

pub fn bounded(axis: BoundAxis, overflow: Overflow) -> Self

The refusal a magnitude makes: the axis that was overrun, and the two counts the overflow already carries.

Source

pub fn over_trail(node: Identity<GeneratedUnit>, refusal: TrailError) -> Self

The refusal a trail that could not be drawn makes, over the unit it was to be drawn for.

The unit is the caller’s to name because a trail refusal carries none, and an origin that cannot be drawn at all is that unit standing with no origin.

Source

pub fn first_issue(&self) -> &PlanIssue

The first issue the pass established, which every refusal has.

Source

pub fn issues(&self) -> &NonEmpty<PlanIssue, PLAN_ISSUE_LIMIT>

Every issue this refusal carries, in the order the pass established them; structurally at least one.

Source

pub const fn capping(&self) -> Capping

Whether this refusal carries every issue its pass established.

Trait Implementations§

Source§

impl Clone for PlanError

Source§

fn clone(&self) -> PlanError

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PlanError

Source§

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

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

impl Display for PlanError

Source§

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

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

impl Eq for PlanError

Source§

impl Error for PlanError

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 Hash for PlanError

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for PlanError

Source§

fn eq(&self, other: &PlanError) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Refused for PlanError

Source§

fn related(&self) -> Vec<Vec<u8>>

The issues established beyond the primary cause; the primary is the summary’s own subject, never a member of its related set.

Source§

fn repairs(&self) -> Bounded<Repair, REPAIR_LIMIT>

This home declares no repair of its own.

Every issue above is about what the caller’s own declaration states, so the repair is that declaration; a sentence composed here would be this compiler citing a fact nobody declared.

Source§

const PHASE: Phase = Phase::Planning

The step of the road this refusal is raised at.
Source§

const FAMILY: Family = PLANNING_FAMILY

The family whose issue space this refusal’s related identities derive in. Read more
Source§

fn class(&self) -> RefusalClass

Which class of refusal the summary line opens with.
Source§

fn first(&self) -> String

How the first established issue reads for a person.
Source§

fn observed(&self) -> Observed

How what was observed differs from the expected contract, read off that same first issue.
Source§

fn body(&self) -> LineBody

What the summary line is a summary of.
Source§

impl StructuralPartialEq for PlanError

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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 = !

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.