amethystate 0.9.1

Type-safe reactive persistence for Rust GUI apps
Documentation
use crate::codec::CodecError;
use thiserror::Error;

pub type TextResult<T> = Result<T, TextStoreError>;

#[derive(Error, Debug)]
pub enum TextStoreError {
    #[error("Text store IO error: {0}")]
    Io(#[from] std::io::Error),

    #[error(transparent)]
    Codec(#[from] CodecError),

    #[error("Text root must be an object/mapping")]
    RootMustBeObject,

    #[error("Text path segment '{0}' not found")]
    PathSegmentMissing(String),

    #[error("File watcher error: {0}")]
    Watch(String),
}