Skip to main content

spatialrust_sync/
error.rs

1//! Errors for sensor time and frame-graph operations.
2
3/// Result type for sync crate operations.
4pub type SyncResult<T> = Result<T, SyncError>;
5
6/// Failures in time sync, frame graphs, and replay.
7#[derive(Debug, thiserror::Error)]
8pub enum SyncError {
9    /// Invalid configuration.
10    #[error("invalid sync configuration: {0}")]
11    InvalidConfiguration(String),
12    /// Missing frame or topic.
13    #[error("missing `{0}`")]
14    #[allow(dead_code)]
15    Missing(String),
16    /// No transform path between frames.
17    #[error("no transform path from `{from}` to `{to}`")]
18    NoTransformPath {
19        /// Source frame.
20        from: String,
21        /// Target frame.
22        to: String,
23    },
24    /// Wrapped records error.
25    #[error(transparent)]
26    Records(#[from] spatialrust_records::RecordsError),
27    /// Wrapped spatial error.
28    #[error(transparent)]
29    Spatial(#[from] spatialrust_core::SpatialError),
30    /// Filesystem / IO failure.
31    #[error("IO error: {0}")]
32    Io(String),
33    /// MCAP codec failure.
34    #[error("MCAP error: {0}")]
35    Mcap(String),
36}