Skip to content
This repository was archived by the owner on Aug 26, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/batch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use libipld::codec::Encode;
use libipld::error::Result;

/// Batch of blocks to insert atomically.
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct Batch<C> {
codec: C,
blocks: Vec<Block>,
Expand Down
1 change: 1 addition & 0 deletions src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use libipld::store::{AliasStore, MultiUserStore, ReadonlyStore, Store, Visibilit
use std::path::Path;

/// Generic block builder for creating blocks.
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct BlockBuilder<S, C> {
store: S,
codec: C,
Expand Down
2 changes: 2 additions & 0 deletions src/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use libipld::store::{ReadonlyStore, Store};
use std::marker::PhantomData;

/// Cache for ipld blocks.
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct Cache<S, C, T> {
builder: BlockBuilder<S, C>,
cache: SizedCache<Cid, T>,
Expand Down Expand Up @@ -73,6 +74,7 @@ where
}

/// Typed batch.
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct CacheBatch<C, T> {
_marker: PhantomData<T>,
cache: Vec<(Cid, T)>,
Expand Down
2 changes: 1 addition & 1 deletion src/codec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pub trait IpldDecoder {
pub trait Encrypted {}

/// Generic ipld codec.
#[derive(Clone, Default)]
#[derive(Clone, Default, Eq, PartialEq)]
pub struct GenericCodec<C, H> {
_marker: PhantomData<(C, H)>,
}
Expand Down