Skip to main content

ClosureError

Struct ClosureError 

Source
pub struct ClosureError<R: Role> { /* private fields */ }
Expand description

How closure says no.

Closure issues are independent and co-establishable, 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<R: Role> ClosureError<R>

Source

pub fn of(issue: ClosureIssue<R>) -> Self

The refusal one established issue makes.

Source

pub fn over(first: ClosureIssue<R>, rest: Vec<ClosureIssue<R>>) -> 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 first_issue(&self) -> &ClosureIssue<R>

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

Source

pub fn issues(&self) -> &NonEmpty<ClosureIssue<R>, CLOSURE_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<R: Clone + Role> Clone for ClosureError<R>

Source§

fn clone(&self) -> ClosureError<R>

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<R: Debug + Role> Debug for ClosureError<R>

Source§

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

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

impl<R: Role> Display for ClosureError<R>

Source§

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

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

impl<R: Eq + Role> Eq for ClosureError<R>

Source§

impl<R: Role> Error for ClosureError<R>

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<R: PartialEq + Role> PartialEq for ClosureError<R>

Source§

fn eq(&self, other: &ClosureError<R>) -> bool

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

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

Inequality operator !=. Read more
Source§

impl<R: Role> Refused for ClosureError<R>

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 plan declared or what the caller’s own renderer produced, so the repair is one of those two declarations; a sentence composed here would be this compiler citing a fact nobody declared.

Source§

const PHASE: Phase = Phase::Closure

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

const FAMILY: Family = CLOSURE_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<R: PartialEq + Role> StructuralPartialEq for ClosureError<R>

Auto Trait Implementations§

§

impl<R> Freeze for ClosureError<R>
where Capped<ClosureIssue<R>, CLOSURE_ISSUE_LIMIT>: Freeze,

§

impl<R> RefUnwindSafe for ClosureError<R>
where Capped<ClosureIssue<R>, CLOSURE_ISSUE_LIMIT>: RefUnwindSafe,

§

impl<R> Send for ClosureError<R>
where Capped<ClosureIssue<R>, CLOSURE_ISSUE_LIMIT>: Send,

§

impl<R> Sync for ClosureError<R>
where Capped<ClosureIssue<R>, CLOSURE_ISSUE_LIMIT>: Sync,

§

impl<R> Unpin for ClosureError<R>
where Capped<ClosureIssue<R>, CLOSURE_ISSUE_LIMIT>: Unpin,

§

impl<R> UnsafeUnpin for ClosureError<R>
where Capped<ClosureIssue<R>, CLOSURE_ISSUE_LIMIT>: UnsafeUnpin,

§

impl<R> UnwindSafe for ClosureError<R>
where Capped<ClosureIssue<R>, CLOSURE_ISSUE_LIMIT>: UnwindSafe,

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.