pub enum SaveError {
Show 13 variants
TruncatedHeader {
bytes: usize,
},
BadMagic,
UnsupportedFormat {
found: u32,
},
UnsupportedSchema {
expected: u32,
found: u32,
},
TooLarge {
bytes: u64,
limit: usize,
},
SizeOverflow,
LengthMismatch {
declared: u64,
actual: u64,
},
ChecksumMismatch {
expected: u32,
actual: u32,
},
InvalidPath,
NotRegularFile,
UnsupportedDurability,
Allocation(TryReserveError),
Io {
stage: SaveStage,
source: Error,
},
}Expand description
Container validation or filesystem failure. No recovery is performed implicitly.
Variants§
TruncatedHeader
A header ended before all fixed fields were available.
BadMagic
The file is not a rayengine save container.
UnsupportedFormat
The engine cannot decode this container format.
UnsupportedSchema
A strict game schema check failed; migration is game-owned.
TooLarge
Declared payload size exceeds the configured bound.
SizeOverflow
Header/payload size cannot be represented on this platform.
LengthMismatch
Truncation or trailing data disagrees with the declared payload size.
ChecksumMismatch
CRC32 of the header prefix and payload did not match.
InvalidPath
Destination must name a file, with an existing stable parent directory.
NotRegularFile
Loading requires a regular file.
UnsupportedDurability
Linux durable semantics are unavailable on this target.
Allocation(TryReserveError)
Bounded container allocation failed.
Io
An operating-system operation failed.
Implementations§
Source§impl SaveError
impl SaveError
Sourcepub fn commit_state(&self) -> CommitState
pub fn commit_state(&self) -> CommitState
Disposition for recovery after a save operation. Rename errors are conservatively ambiguous (notably on network filesystems). A directory sync error means the new container is already installed; never roll it back implicitly. Load/validation errors do not modify files.
Trait Implementations§
Source§impl Error for SaveError
impl Error for SaveError
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()