[−][src]Crate hypercore
Example
extern crate hypercore; use hypercore::Feed; use std::path::PathBuf; let path = PathBuf::from("./my-first-dataset"); let mut feed = Feed::new(&path).unwrap(); feed.append(b"hello").unwrap(); feed.append(b"world").unwrap(); println!("{:?}", feed.get(0)); // prints "hello" println!("{:?}", feed.get(1)); // prints "world"
Modules
| bitfield |
Bitfield module. Exposes |
| prelude |
Convenience wrapper to import all of Hypercore's core. |
Structs
| Feed |
Append-only log structure. |
| FeedBuilder |
Construct a new |
| Node |
Nodes that are persisted to disk. |
| Peer |
A peer on the network. |
| Proof |
A merkle proof for an index, created by the |
| PublicKey |
An ed25519 public key. |
| SecretKey |
An EdDSA secret key. |
| Signature |
An EdDSA signature. |
| Storage |
Save data to a desired storage backend. |
Enums
| Event |
Events emitted. |
| Store |
The types of stores that can be created. |
Traits
| NodeTrait |
Functions that need to be implemented for the Data that |
Functions
| generate_keypair |
Generate a new |
| sign |
Sign a byte slice using a keypair's private key. |
| verify |
Verify a signature on a message with a keypair's public key. |
Type Definitions
| Result |
A specialized |