#[non_exhaustive]pub enum NirError {
Unimplemented(&'static str),
UnknownNodeType(String),
DuplicateNode(String),
MissingNode(String),
DuplicateEdge(String, String),
InvalidGraph(String),
UnsupportedVersion(String),
MissingField(String),
InvalidTensor(String),
ReadLimitExceeded {
context: String,
limit: usize,
used: usize,
requested: usize,
},
Io(String),
}Expand description
Public error type for NIR operations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Unimplemented(&'static str)
Feature not yet implemented.
Returned by HDF5 I/O function stubs when the hdf5 feature is not enabled.
UnknownNodeType(String)
HDF5 / wire type string is not a known NIR node.
DuplicateNode(String)
A node name was inserted twice into the same graph.
MissingNode(String)
An edge or lookup referenced a node name that is not in the graph.
DuplicateEdge(String, String)
The same directed edge (src, dst) appears more than once.
InvalidGraph(String)
Structural or semantic problem with a graph that is not covered above.
UnsupportedVersion(String)
NIR file / graph version is not supported by this crate.
MissingField(String)
A required wire field was absent when decoding a node or graph.
InvalidTensor(String)
Tensor shape / data length mismatch or other tensor invariant failure.
ReadLimitExceeded
A bounded read would exceed its decoded-allocation budget.
Fields
Io(String)
Filesystem or HDF5 library failure while reading or writing a .nir file.
The underlying hdf5::Error is rendered into the message rather than
carried, so NirError stays Clone + Eq.
Trait Implementations§
impl Eq for NirError
Source§impl Error for NirError
impl Error for NirError
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 NirError
Auto Trait Implementations§
impl Freeze for NirError
impl RefUnwindSafe for NirError
impl Send for NirError
impl Sync for NirError
impl Unpin for NirError
impl UnsafeUnpin for NirError
impl UnwindSafe for NirError
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.