Skip to main content

bevy_cache/
error.rs

1use thiserror::Error;
2
3/// Errors that can occur in the cache system.
4#[derive(Debug, Error)]
5pub enum CacheError {
6    #[error("IO error: {0}")]
7    Io(#[from] std::io::Error),
8
9    #[error("RON serialization error: {0}")]
10    RonSerialize(#[from] ron::Error),
11
12    #[error("RON deserialization error: {0}")]
13    RonDeserialize(#[from] ron::error::SpannedError),
14
15    #[error("Cache entry not found: {0}")]
16    NotFound(String),
17
18    #[error("Invalid cache key (must be a non-empty relative path using '/' separators): {0}")]
19    InvalidKey(String),
20}