#[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]NoVertex
A link names a vertex outside the structure.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]NotLiteral
A link names a vertex that is not a literal.
Fields
This variant is marked as non-exhaustive
#[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]LinkedTwice
A literal appears in two links.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]Unlinked
A literal has no link, so the structure is incomplete.
Fields
This variant is marked as non-exhaustive
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]Disconnected
Every switching falls into several parts.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]DirectedCycle
A directed cycle of the essential net.
Fields
This variant is marked as non-exhaustive
#[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]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]NotIntuitionistic
The structure’s sequent has no intuitionistic reading, so it has no essential net.
Fields
This variant is marked as non-exhaustive
shape: ShapeErrorWhy 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]Mode
Proof nets exist in linear mode only, and the mode is affine.
Fields
This variant is marked as non-exhaustive
#[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
rule: &'static strThe 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]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]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]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]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]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]Refused
A bound or the caller’s stop ended the call without a verdict on the structure.
Implementations§
Source§impl NetError
impl NetError
Sourcepub fn kind(&self) -> ErrorKind
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.
Sourcepub fn code(&self) -> &'static str
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.
Trait Implementations§
impl Eq for NetError
Source§impl Error for NetError
impl Error for NetError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
impl StructuralPartialEq for NetError
Auto Trait Implementations§
impl Forget for NetError
impl Freeze for NetError
impl Move for NetError
impl RefUnwindSafe for NetError
impl Send for NetError
impl Sync for NetError
impl Unpin for NetError
impl UnsafeUnpin for NetError
impl UnwindSafe for NetError
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
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§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
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
T, using the provided data to resolve any offsets.