update docs

This commit is contained in:
Dustin J. Mitchell 2024-11-17 23:03:36 -05:00
parent e5091c51de
commit dfd74429bb
No known key found for this signature in database
2 changed files with 8 additions and 15 deletions

View file

@ -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)] #[derive(Debug, thiserror::Error)]
pub enum ServerError { pub enum ServerError {
/// There is no client with the given ClientId. /// There is no client with the given ClientId.
@ -5,5 +9,5 @@ pub enum ServerError {
NoSuchClient, NoSuchClient,
#[error(transparent)] #[error(transparent)]
Other(#[from] anyhow::Error), // source and Display delegate to anyhow::Error Other(#[from] anyhow::Error),
} }

View file

@ -7,21 +7,10 @@
//! This crate uses an abstract storage backend. Note that this does not implement the //! 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. //! 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 //! To use, create a new [`Server`] instance and call the relevant protocol API methods. The
//! the protocol documentation. //! arguments and return values correspond closely to 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.
mod error; mod error;
mod inmemory; mod inmemory;