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
SpendandRegister, using its content_hash (inXorNameformat) 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::Recordinto any type. UseRecordHeader::from_recordif you want theRecordHeaderinstead. - Utility to serialize the provided data along with the RecordKind to be stored as Record::value Returns Bytes to avoid accidental clone allocations