Skip to content

Commit ce6847e

Browse files
committed
Add api module docs
people are confused how to obtain an API instance to work with, so this give them pointers.
1 parent e305a81 commit ce6847e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/api.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22
//!
33
//! This API is both for interacting with an in-process store and for interacting
44
//! with a remote store via rpc calls.
5+
//!
6+
//! The entry point for the api is the [`Store`] struct. There are several ways
7+
//! to obtain a `Store` instance: it is available via [`Deref`](std::ops::Deref)
8+
//! from the different store implementations
9+
//! (e.g. [`MemStore`](crate::store::mem::MemStore)
10+
//! and [`FsStore`](crate::store::fs::FsStore)) as well as on the
11+
//! [`BlobsProtocol`](crate::BlobsProtocol) iroh protocol handler.
12+
//!
13+
//! You can also [`connect`](Store::connect) to a remote store that is listening
14+
//! to rpc requests.
515
use std::{io, net::SocketAddr, ops::Deref, sync::Arc};
616

717
use bao_tree::io::EncodeError;

0 commit comments

Comments
 (0)