Expand description
Content identifiers (CIDs) for void objects.
Void uses a single canonical CID format for all content-addressed objects:
- Version: CIDv1
- Codec: raw (0x55)
- Multihash: SHA-256 (0x12)
This is intentionally restrictive. Void does not support CIDv0, dag-pb, dag-cbor, or other IPFS CID variants. When fetching from IPFS gateways, CIDs are validated to match this format before any content verification.
The VoidCid newtype wraps cid::Cid and provides Display,
eliminating the need for to_string() helper calls at every use site.
Structs§
- VoidCid
- A content identifier for void objects.
Constants§
- CODEC_
RAW - Raw codec for CIDv1 (0x55).
- MULTIHASH_
SHA2_ 256 - SHA-256 multihash code (0x12).
Traits§
- ToVoid
Cid - Extension trait that adds
.to_void_cid()and.to_cid_string()to typed CID newtypes fromvoid-crypto(CommitCid,MetadataCid,ShardCid, etc.).
Functions§
- create
- Creates a CIDv1 from raw bytes using SHA-256.
- from_
bytes - Parses a CID from raw bytes.
- parse
- Parses a CID from its string representation.
- to_
bytes - Converts a CID to its byte representation.
- to_
string - Converts a CID to its string representation.
- validate
- Validates that a CID uses void’s canonical format (CIDv1/raw/SHA-256).