ant_protocol

Module storage

Source
Expand description

Storage types for transactions, chunks and registers.

Structs§

Enums§

  • Indicates the type of the record content. Note for Spend and Register, using its content_hash (in XorName format) to indicate different content body.
  • A strategy that translates into a configuration for exponential backoff. The first retry is done after 2 seconds, after which the backoff is roughly doubled each time. The interval does not go beyond 32 seconds. So the intervals increase from 2 to 4, to 8, to 16, to 32 seconds and all attempts are made at most 32 seconds apart.

Functions§

  • Utility to deserialize a KAD::Record into any type. Use RecordHeader::from_record if you want the RecordHeader instead.
  • Utility to serialize the provided data along with the RecordKind to be stored as Record::value Returns Bytes to avoid accidental clone allocations