mirror of
https://github.com/Dasemu/Synapse.git
synced 2026-11-26 23:36:20 +00:00
Deterministic Logseq-compatible Markdown export committed to a bare gix repository, incremental snapshots driven by the op log, snapshot policy, page history/diff, restore through the Graph API and pure-Rust HTTP push. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
26 lines
597 B
Rust
26 lines
597 B
Rust
use thiserror::Error;
|
|
|
|
#[derive(Debug, Error)]
|
|
pub enum Error {
|
|
#[error("core: {0}")]
|
|
Core(#[from] synapse_core::Error),
|
|
#[error("sqlite: {0}")]
|
|
Sqlite(#[from] rusqlite::Error),
|
|
#[error("io: {0}")]
|
|
Io(#[from] std::io::Error),
|
|
#[error("json: {0}")]
|
|
Json(#[from] serde_json::Error),
|
|
#[error("git: {0}")]
|
|
Git(String),
|
|
#[error("not found: {0}")]
|
|
NotFound(String),
|
|
#[error("push: {0}")]
|
|
Push(String),
|
|
}
|
|
|
|
pub type Result<T> = std::result::Result<T, Error>;
|
|
|
|
pub(crate) fn git<E: std::fmt::Display>(e: E) -> Error {
|
|
Error::Git(e.to_string())
|
|
}
|