pub enum FlowError {
Show 14 variants
NodeNotFound {
id: String,
},
EdgeNotFound {
id: String,
},
DuplicateNodeId {
id: String,
},
DuplicateEdgeId {
id: String,
},
InvalidConnection {
message: String,
},
SelfConnection,
SpatialIndex {
message: String,
},
Layout {
message: String,
},
InvalidPosition {
x: f64,
y: f64,
},
InvalidSize {
width: f64,
height: f64,
},
Serialization {
message: String,
},
InvalidOperation {
message: String,
},
HandleNotFound {
handle_id: String,
},
ConnectionLimitExceeded {
handle_id: String,
current: usize,
limit: usize,
},
}Expand description
Main error type for flow operations
Variants§
NodeNotFound
EdgeNotFound
DuplicateNodeId
DuplicateEdgeId
InvalidConnection
SelfConnection
SpatialIndex
Layout
InvalidPosition
InvalidSize
Serialization
InvalidOperation
HandleNotFound
ConnectionLimitExceeded
Implementations§
Source§impl FlowError
impl FlowError
Sourcepub fn node_not_found(id: impl Into<String>) -> Self
pub fn node_not_found(id: impl Into<String>) -> Self
Create a node not found error
Sourcepub fn edge_not_found(id: impl Into<String>) -> Self
pub fn edge_not_found(id: impl Into<String>) -> Self
Create an edge not found error
Sourcepub fn duplicate_node_id(id: impl Into<String>) -> Self
pub fn duplicate_node_id(id: impl Into<String>) -> Self
Create a duplicate node ID error
Sourcepub fn duplicate_edge_id(id: impl Into<String>) -> Self
pub fn duplicate_edge_id(id: impl Into<String>) -> Self
Create a duplicate edge ID error
Sourcepub fn invalid_connection(message: impl Into<String>) -> Self
pub fn invalid_connection(message: impl Into<String>) -> Self
Create an invalid connection error
Sourcepub fn spatial_index(message: impl Into<String>) -> Self
pub fn spatial_index(message: impl Into<String>) -> Self
Create a spatial index error
Sourcepub fn invalid_operation(message: impl Into<String>) -> Self
pub fn invalid_operation(message: impl Into<String>) -> Self
Create an invalid operation error
Sourcepub fn handle_not_found(handle_id: impl Into<String>) -> Self
pub fn handle_not_found(handle_id: impl Into<String>) -> Self
Create a handle not found error
Trait Implementations§
Source§impl Error for FlowError
impl Error for FlowError
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()
impl StructuralPartialEq for FlowError
Auto Trait Implementations§
impl Freeze for FlowError
impl RefUnwindSafe for FlowError
impl Send for FlowError
impl Sync for FlowError
impl Unpin for FlowError
impl UnwindSafe for FlowError
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