Enum sunscreen_fhe_program::NodeError
source · pub enum NodeError {
MissingOperand(EdgeInfo),
MissingParent(NodeIndex),
ParentHasIncorrectOutputType(Box<(EdgeInfo, OutputType, OutputType)>),
WrongOperandCount(Box<(usize, usize)>),
}
Expand description
An error on a node in an FheProgram
.
Variants§
MissingOperand(EdgeInfo)
The node is missing an expected operand of the contained type.
MissingParent(NodeIndex)
The parent node specified at the given EdgeInfo
does not exist.
ParentHasIncorrectOutputType(Box<(EdgeInfo, OutputType, OutputType)>)
For the parent at EdgeInfo (first argument), the expected output type (second argument) does not match the actual (third argument) output type.
WrongOperandCount(Box<(usize, usize)>)
The node has expects a specific number of input operands (first argument), but got some other number (second argument).
Implementations§
source§impl NodeError
impl NodeError
sourcepub fn parent_has_incorrect_output_type(
edge: EdgeInfo,
expected: OutputType,
actual: OutputType
) -> Self
pub fn parent_has_incorrect_output_type( edge: EdgeInfo, expected: OutputType, actual: OutputType ) -> Self
Creates a NodeError::ParentHasIncorrectOutputType
.
sourcepub fn wrong_operand_count(expected: usize, actual: usize) -> Self
pub fn wrong_operand_count(expected: usize, actual: usize) -> Self
Creates a NodeError::WrongOperandCount
.
Trait Implementations§
source§impl Error for NodeError
impl Error for NodeError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<NodeError> for NodeError
impl PartialEq<NodeError> for NodeError
impl Eq for NodeError
impl StructuralEq for NodeError
impl StructuralPartialEq for NodeError
Auto Trait Implementations§
impl RefUnwindSafe for NodeError
impl Send for NodeError
impl Sync for NodeError
impl Unpin for NodeError
impl UnwindSafe for NodeError
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.