Skip to main content

NetError

Enum NetError 

Source
#[non_exhaustive]
pub enum NetError {
Show 22 variants
#[non_exhaustive]
NoVertex { vertex: u32, vertices: u32, },
#[non_exhaustive]
NotLiteral { vertex: VertexId, },
#[non_exhaustive]
NotDual { x: VertexId, y: VertexId, },
#[non_exhaustive]
LinkedTwice { vertex: VertexId, },
#[non_exhaustive]
Unlinked { vertex: VertexId, }, Empty,
#[non_exhaustive]
SwitchingCycle { cycle: Vec<VertexId>, },
#[non_exhaustive]
Disconnected { parts: Vec<Vec<VertexId>>, },
#[non_exhaustive]
DirectedCycle { cycle: Vec<VertexId>, },
#[non_exhaustive]
NoDominator { implication: VertexId, path: Vec<VertexId>, },
#[non_exhaustive]
Crossing { links: [(VertexId, VertexId); 2], },
#[non_exhaustive]
NotIntuitionistic { shape: ShapeError, },
#[non_exhaustive]
Fragment { fragment: Fragment, },
#[non_exhaustive]
Mode { mode: Mode, },
#[non_exhaustive]
Rule { node: NodeId, rule: &'static str, },
#[non_exhaustive]
Placement { vertex: VertexId, fault: Placement, },
#[non_exhaustive]
Unattached { vertex: VertexId, },
#[non_exhaustive]
InBox { door: VertexId, error: Box<NetError>, },
#[non_exhaustive]
NotMell { fragment: Fragment, mode: Mode, },
#[non_exhaustive]
NoCut { vertex: Option<VertexId>, },
#[non_exhaustive]
Reduction { error: Box<NetError>, },
#[non_exhaustive]
Refused { refusal: Refusal, },
}
Expand description

Why a proof structure is not a proof net, why a list of links is not a proof structure, or why there is no structure.

Display prints each vertex as its id; describe prints it as its formula.

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.
§

#[non_exhaustive]
NoVertex

A link names a vertex outside the structure.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§vertex: u32

The vertex named.

§vertices: u32

How many vertices the structure has.

§

#[non_exhaustive]
NotLiteral

A link names a vertex that is not a literal.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§vertex: VertexId

The vertex.

§

#[non_exhaustive]
NotDual

A link joins two literals that are not a and ~a for one atom.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§x: VertexId

The first literal of the link.

§y: VertexId

The second literal of the link.

§

#[non_exhaustive]
LinkedTwice

A literal appears in two links.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§vertex: VertexId

The literal.

§

#[non_exhaustive]
Unlinked

A literal has no link, so the structure is incomplete.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§vertex: VertexId

The literal.

§

Empty

The structure has no vertex at all: no rule concludes the empty sequent.

§

#[non_exhaustive]
SwitchingCycle

A cycle survives some switching.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§cycle: Vec<VertexId>

The vertices the cycle runs through, in order along it.

§

#[non_exhaustive]
Disconnected

Every switching falls into several parts.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§parts: Vec<Vec<VertexId>>

The parts of the switching that keeps the left premise of every ⅋, each given by the vertices in it that have no parent edge there: the roots and the right premises of ⅋ nodes.

§

#[non_exhaustive]
DirectedCycle

A directed cycle of the essential net.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§cycle: Vec<VertexId>

The vertices the cycle runs through, each followed by the one its edge leads to, the last by the first.

§

#[non_exhaustive]
NoDominator

An implication in output position does not dominate its antecedent in the essential net: a path from the antecedent reaches the goal around it.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§implication: VertexId

The implication, A ⊸ B stored as A⊥ ⅋ B.

§path: Vec<VertexId>

The path, from the antecedent A⊥ to the goal.

§

#[non_exhaustive]
Crossing

Two links cross in the cyclic order of the literals, so the structure is no proof net of the cyclic order: going round, the four literals alternate between the two links.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§links: [(VertexId, VertexId); 2]

The two links, each from its smaller vertex to its larger one, the first one’s smaller vertex the smallest of the four.

§

#[non_exhaustive]
NotIntuitionistic

The structure’s sequent has no intuitionistic reading, so it has no essential net.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§shape: ShapeError

Why the sequent has no reading.

§

#[non_exhaustive]
Fragment

Proof nets exist for unit-free MLL only, and the sequent lies in a larger fragment.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§fragment: Fragment

The sequent’s fragment.

§

#[non_exhaustive]
Mode

Proof nets exist in linear mode only, and the mode is affine.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§mode: Mode

The mode asked for.

§

#[non_exhaustive]
Rule

A node of the proof applies a rule that a proof net of unit-free MLL has no place for.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§node: NodeId

The node.

§rule: &'static str

The rule’s name, as Node::name gives it.

§

#[non_exhaustive]
Placement

A vertex of a structure with boxes is out of place in the formula trees, the boxes, the links or the weakenings.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§vertex: VertexId

The vertex.

§fault: Placement

What is wrong with it.

§

#[non_exhaustive]
Unattached

A weakening of a structure with boxes, a ? vertex without copies, hangs on no axiom link.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§vertex: VertexId

The ? vertex.

§

#[non_exhaustive]
InBox

The criterion fails inside a box, with the boxes in it contracted to their ! vertex and the ? vertices outside it standing for their doors.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§door: VertexId

The box’s ! vertex.

§error: Box<NetError>

How the criterion fails there.

§

#[non_exhaustive]
NotMell

Proof nets with boxes exist for unit-free MELL in classical mode, with or without Mix, and in intuitionistic mode, and the sequent or the mode lies outside.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§fragment: Fragment

The sequent’s fragment.

§mode: Mode

The mode asked for.

§

#[non_exhaustive]
NoCut

A step of cut elimination was asked of a vertex that is no end of a cut link, or of a net without one.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§vertex: Option<VertexId>

The vertex named, or None where the strategy found no cut link.

§

#[non_exhaustive]
Reduction

The criterion refused the net a step of cut elimination made: a defect of this crate, which never returns such a net.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§error: Box<NetError>

How the criterion refused it.

§

#[non_exhaustive]
Refused

A bound or the caller’s stop ended the call without a verdict on the structure.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§refusal: Refusal

The bound that refused it, or the stop.

Implementations§

Source§

impl NetError

Source

pub fn kind(&self) -> ErrorKind

Returns what sort of failure this is.

A list of links that is no structure is malformed, and a structure that is no net is invalid. A sequent, a mode or a rule without nets is unsupported, and so is a step of cut elimination asked of no cut link. A refusal is no verdict and has its refusal’s kind. A net that a step made and the criterion refuses is a defect.

Source

pub fn code(&self) -> &'static str

Returns the stable code of the error.

The code is no_nets where no structure exists, not_intuitionistic where no essential net does, no_cut for a step asked of no cut link, and reduction_rejected for a step’s net the criterion refuses. A refusal has its refusal’s code. Every other error is invalid_net.

Source

pub fn describe<'a>(&'a self, owner: &'a impl Owner) -> Described<'a>

Returns the error for display with every vertex as its formula followed by its id in brackets, as in ~A[0], read from owner, the structure that failed or its forest.

Trait Implementations§

Source§

impl Clone for NetError

Source§

fn clone(&self) -> Self

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 NetError

Source§

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

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

impl Display for NetError

Source§

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

Writes the error with vertex ids.

Source§

impl Eq for NetError

Source§

impl Error for NetError

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 From<NetError> for Error

Source§

fn from(error: NetError) -> Self

Wraps the structure’s error.

Source§

impl PartialEq for NetError

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl Serialize for NetError

Source§

fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error>

Writes the reason’s kind and the vertices it names.

Source§

impl StructuralPartialEq for NetError

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> Finish for T

Source§

fn finish(self)

Does nothing but move self, equivalent to drop.
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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<U, T> ToOwnedObj<U> for T
where U: FromObjRef<T>,

Source§

fn to_owned_obj(&self, data: FontData<'_>) -> U

Convert this type into T, using the provided data to resolve any offsets.
Source§

impl<U, T> ToOwnedTable<U> for T
where U: FromTableRef<T>,

Source§

fn to_owned_table(&self) -> U

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.