Skip to main content

vibe_graph_layout_gpu/
error.rs

1//! Error types for GPU layout operations.
2
3use thiserror::Error;
4
5/// Errors that can occur during GPU layout operations.
6#[derive(Error, Debug)]
7pub enum LayoutError {
8    /// Failed to initialize GPU device.
9    #[error("GPU initialization failed: {0}")]
10    GpuInit(String),
11
12    /// Failed to create GPU resources.
13    #[error("GPU resource creation failed: {0}")]
14    ResourceCreation(String),
15
16    /// Failed to execute GPU compute.
17    #[error("GPU compute execution failed: {0}")]
18    ComputeExecution(String),
19
20    /// Failed to read back data from GPU.
21    #[error("GPU readback failed: {0}")]
22    Readback(String),
23
24    /// Invalid graph data.
25    #[error("Invalid graph: {0}")]
26    InvalidGraph(String),
27
28    /// Layout not initialized.
29    #[error("Layout not initialized")]
30    NotInitialized,
31}