cid/
lib.rs

1//! # cid
2//!
3//! Implementation of [cid](https://github.com/ipld/cid) in Rust.
4
5#![deny(missing_docs)]
6#![cfg_attr(not(feature = "std"), no_std)]
7
8mod cid;
9mod error;
10mod version;
11
12#[cfg(any(test, feature = "arb"))]
13mod arb;
14#[cfg(feature = "serde-codec")]
15pub mod serde;
16
17pub use self::cid::Cid as CidGeneric;
18pub use self::error::{Error, Result};
19pub use self::version::Version;
20
21#[cfg(feature = "alloc")]
22pub use multibase;
23pub use multihash;
24
25/// A Cid that contains a multihash with an allocated size of 512 bits.
26///
27/// This is the same digest size the default multihash code table has.
28///
29/// If you need a CID that is generic over its digest size, use [`CidGeneric`] instead.
30pub type Cid = CidGeneric<64>;