Module sn_protocol::storage
source · Expand description
Storage types for spends, chunks and registers.
Structs§
- Chunk, an immutable chunk of data
- Address of a Chunk
- Address of a Register on the SAFE Network
- The address of a SignedSpend in the network. This is used to check if a CashNote is spent, note that the actual CashNote is not stored on the Network.
Enums§
- Indicates the type of the record content. Note for
Spend
andRegister
, using its content_hash (inXorName
format) to indicate different content body. - Represents the strategy for retrying operations. This encapsulates both the duration it may take for an operation to complete or the retry attempts that it may take. This allows the retry of each operation, e.g., PUT/GET of Chunk/Registers/Spend to be more flexible.
Functions§
- Utility to deserialize a
KAD::Record
into any type. UseRecordHeader::from_record
if you want theRecordHeader
instead. - Utility to serialize the provided data along with the RecordKind to be stored as Record::value Returns Bytes to avoid accidental clone allocations