Skip to main content

Module chunk

Module chunk 

Source
Expand description

Chunk types and operations

This module provides implementations of various chunk types used in the storage system, along with functionality for creating, parsing, and verifying chunks.

§Chunk Type System

The chunk system is built around a hierarchy of traits:

  • Chunk - Core trait for all chunk types
  • ChunkType - Adds compile-time type identification
  • ChunkTypeSet - Defines which chunk types a system supports

§Type-Erased Chunks

The AnyChunk enum provides runtime polymorphism for chunks without requiring object-safe traits.

Re-exports§

pub use encryption::ChunkEncrypt;

Modules§

encryption
Chunk encryption using Keccak-256 counter-mode cipher.

Structs§

ChunkTypeId
Wire-level chunk type identifier.
ContentChunk
A content-addressed chunk with configurable body size.
ContentOnlyChunkSet
A chunk type set that accepts only content-addressed chunks.
EncryptedContentChunk
Result of encrypting a content chunk.
SingleOwnerChunk
A single-owner chunk with configurable body size.
StandardChunkSet
Standard Swarm chunk type set.

Enums§

AnyChunk
Type-erased chunk for runtime polymorphism with configurable body size.

Traits§

BmtChunk
Trait for chunks that contain a BMT body
Chunk
Core trait for all chunk types in the system.
ChunkHeader
Core trait for chunk header
ChunkMetadata
Core trait for chunk metadata
ChunkSerialization
Trait for serializing chunks with type prefix.
ChunkType
Trait for chunk types with compile-time type information.
ChunkTypeSet
Trait defining a set of supported chunk types with configurable body size.

Type Aliases§

ChunkAddress
Type alias for chunk addresses