Skip to main content

Outcome

Enum Outcome 

Source
pub enum Outcome<M, E> {
    Failed(E),
    Module(M, Vec<E>),
}
Expand description

What a checker hands ModuleWalker::check_in_order back for one module.

A module with errors can still have a shape: it has the interface its declarations that canonicalized give it, whatever the typer says of them, and a typed tree for each declaration the typer did not reject (DEC-23 decisions 1, 2 and 5). So “checked” and “failed” are not the only two answers: Module carries a module together with everything wrong with it.

Variants§

§

Failed(E)

Nothing to publish.

§

Module(M, Vec<E>)

A module, and everything wrong with it. An empty list does not say the module checked: a checker may drop an error that restates another module’s failure, so the caller reads the module for whether it is whole as well.

Trait Implementations§

Source§

impl<M: Debug, E: Debug> Debug for Outcome<M, E>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<M, E> Freeze for Outcome<M, E>
where E: Freeze, M: Freeze,

§

impl<M, E> RefUnwindSafe for Outcome<M, E>

§

impl<M, E> Send for Outcome<M, E>
where E: Send, M: Send,

§

impl<M, E> Sync for Outcome<M, E>
where E: Sync, M: Sync,

§

impl<M, E> Unpin for Outcome<M, E>
where E: Unpin, M: Unpin,

§

impl<M, E> UnsafeUnpin for Outcome<M, E>
where E: UnsafeUnpin, M: UnsafeUnpin,

§

impl<M, E> UnwindSafe for Outcome<M, E>
where E: UnwindSafe, M: 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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.