mirror of
https://github.com/GothenburgBitFactory/taskchampion-sync-server.git
synced 2025-06-26 10:54:29 +02:00
update docs
This commit is contained in:
parent
e5091c51de
commit
dfd74429bb
2 changed files with 8 additions and 15 deletions
|
@ -1,3 +1,7 @@
|
|||
/// An error from the [`crate::Server`] type.
|
||||
///
|
||||
/// This type represents only circumstances outside the realm of the protocol, and not the specific
|
||||
/// results descriebd in the protocol documentation.
|
||||
#[derive(Debug, thiserror::Error)]
|
||||
pub enum ServerError {
|
||||
/// There is no client with the given ClientId.
|
||||
|
@ -5,5 +9,5 @@ pub enum ServerError {
|
|||
NoSuchClient,
|
||||
|
||||
#[error(transparent)]
|
||||
Other(#[from] anyhow::Error), // source and Display delegate to anyhow::Error
|
||||
Other(#[from] anyhow::Error),
|
||||
}
|
||||
|
|
|
@ -7,21 +7,10 @@
|
|||
//! This crate uses an abstract storage backend. Note that this does not implement the
|
||||
//! HTTP-specific portions of the protocol, nor provide any storage implementations.
|
||||
//!
|
||||
//! ## API Methods
|
||||
//! ## Usage
|
||||
//!
|
||||
//! The following API methods are implemented. These methods are documented in more detail in
|
||||
//! the protocol documentation.
|
||||
//!
|
||||
//! * [`add_version`]
|
||||
//! * [`get_child_version`]
|
||||
//! * [`add_snapshot`]
|
||||
//! * [`get_snapshot`]
|
||||
//!
|
||||
//! Each API method takes:
|
||||
//!
|
||||
//! * [`StorageTxn`] to access storage. Methods which modify storage will commit the transaction before returning.
|
||||
//! * [`ServerConfig`] providing basic configuration for the server's behavior.
|
||||
//! * `client_id` and a [`Client`] providing the client metadata.
|
||||
//! To use, create a new [`Server`] instance and call the relevant protocol API methods. The
|
||||
//! arguments and return values correspond closely to the protocol documentation.
|
||||
|
||||
mod error;
|
||||
mod inmemory;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue