mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-14 00:26:51 +08:00
c9bffc13b5
fix #13529 #### PR Dependency Tree * **PR #14481** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Mobile blob caching with file-backed storage for faster loads and reduced network usage * Blob decoding with lazy refresh on token-read failures for improved reliability * Full-text search/indexing exposed to mobile apps * Document sync APIs and peer clock management for robust cross-device sync * **Tests** * Added unit tests covering payload decoding, cache safety, and concurrency * **Dependencies** * Added an LRU cache dependency and a new mobile-shared package for shared mobile logic <!-- end of auto-generated comment: release notes by coderabbit.ai -->
20 lines
533 B
Rust
20 lines
533 B
Rust
use affine_common::doc_parser::ParseError;
|
|
|
|
pub type Result<T> = std::result::Result<T, Error>;
|
|
|
|
#[derive(Debug, thiserror::Error)]
|
|
pub enum Error {
|
|
#[error("Sqlite Error: {0}")]
|
|
SqlxError(#[from] sqlx::Error),
|
|
#[error("Migrate Error: {0}")]
|
|
MigrateError(#[from] sqlx::migrate::MigrateError),
|
|
#[error("Connection in progress")]
|
|
ConnectionInProgress,
|
|
#[error("Invalid operation")]
|
|
InvalidOperation,
|
|
#[error("Serialization Error: {0}")]
|
|
Serialization(String),
|
|
#[error(transparent)]
|
|
Parse(#[from] ParseError),
|
|
}
|