#[non_exhaustive]pub enum FragmentError {
IdMismatch {
index: usize,
id: NodeId,
},
RootOutOfRange(NodeId),
RootNotAtOrigin,
SurfaceMismatch,
ChildOutOfRange {
parent: NodeId,
child: NodeId,
},
MultipleParents(NodeId),
Unreachable(NodeId),
SourceIdMismatch {
index: usize,
id: SourceId,
},
UnknownSource {
node: NodeId,
source: SourceId,
},
}Expand description
Why a fragment breaks the IR invariants.
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.
IdMismatch
A node is stored at an index other than its id.
RootOutOfRange(NodeId)
The root id indexes no node.
RootNotAtOrigin
The root origin is not (0, 0).
SurfaceMismatch
The surface does not match the root’s width, height and depth.
ChildOutOfRange
A box lists a child id that indexes no node.
MultipleParents(NodeId)
A node is listed as a child more than once, or the root is listed as a child.
Unreachable(NodeId)
A node is not reachable from the root.
SourceIdMismatch
A source file is stored at an index other than its id.
UnknownSource
A node or entry refers to an unregistered source file.
Trait Implementations§
Source§impl Clone for FragmentError
impl Clone for FragmentError
impl Copy for FragmentError
Source§impl Debug for FragmentError
impl Debug for FragmentError
Source§impl Display for FragmentError
impl Display for FragmentError
impl Eq for FragmentError
Source§impl Error for FragmentError
impl Error for FragmentError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for FragmentError
impl PartialEq for FragmentError
impl StructuralPartialEq for FragmentError
Auto Trait Implementations§
impl Freeze for FragmentError
impl RefUnwindSafe for FragmentError
impl Send for FragmentError
impl Sync for FragmentError
impl Unpin for FragmentError
impl UnsafeUnpin for FragmentError
impl UnwindSafe for FragmentError
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
Mutably borrows from an owned value. Read more