#[non_exhaustive]pub enum PatchError {
InvalidNode {
node: NodeId,
},
InvalidPort {
node: NodeId,
name: Option<String>,
port: Option<PortId>,
available: Vec<String>,
},
InvalidCable,
CycleDetected {
nodes: Vec<NodeId>,
names: Vec<String>,
},
CompilationFailed(String),
SignalMismatch {
from_kind: SignalKind,
to_kind: SignalKind,
message: String,
},
}Expand description
Error types for patch operations.
Marked #[non_exhaustive]: downstream match expressions must include a wildcard arm,
so new variants can be added in future without breaking callers.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidNode
A referenced node does not exist in the patch.
InvalidPort
A referenced port does not exist on the given node.
Carries enough context to be actionable: the offending node, the requested port by name and/or id (whichever the caller supplied), and the list of valid port names on that node so the message can suggest the intended target.
InvalidCable
CycleDetected
A feedback cycle with no cycle-breaker (delay) was detected.
nodes are the NodeIds stuck in the cycle; names are their resolved module
names captured at error-construction time so Display can
print the actual path without a back-reference to the Patch.
CompilationFailed(String)
SignalMismatch
Signal type mismatch (only in Strict validation mode)
Trait Implementations§
Source§impl Clone for PatchError
impl Clone for PatchError
Source§fn clone(&self) -> PatchError
fn clone(&self) -> PatchError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PatchError
impl Debug for PatchError
Source§impl Display for PatchError
impl Display for PatchError
Source§impl Error for PatchError
Available on crate feature std only.
impl Error for PatchError
std only.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()
Source§impl From<PatchError> for QuiverError
Available on crate feature wasm only.
impl From<PatchError> for QuiverError
wasm only.