co-storage 0.1.0

COKIT content addressed block storage implementations.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
// SPDX-License-Identifier: AGPL-3.0-only
// Copyright (C) 2026 1io BRANDGUARDIAN GmbH

use ipld_core::ipld::Ipld;

pub trait ObjectAPI {
	/// Returns a block from storage.
	fn get(&self, cid: &Cid) -> Result<Ipld, StorageError>;

	/// Inserts a block into storage.
	fn set(&mut self, object: Ipld) -> Result<Cid, StorageError>;
}