Struct hypercore::Feed
[−]
[src]
pub struct Feed { pub path: PathBuf, }
Append-only log structure.
Fields
path: PathBuf
Location on disk of where to persist the archive.
Methods
impl Feed
[src]
pub fn new(_path: PathBuf) -> Self
[src]
Create a new instance with an on-disk storage backend.
pub fn with_storage() -> Self
[src]
Create a new instance with a custom storage backend.
pub fn append(&self, _data: &[u8]) -> Result<(), Error>
[src]
Append data into the log.
pub fn get(&self, _index: usize) -> Option<&[u8]>
[src]
Retrieve data from the log.