ShardedKeyAddressEncoded

Type Alias ShardedKeyAddressEncoded 

Source
pub type ShardedKeyAddressEncoded = [u8; 28];
Expand description

Stack-allocated encoded key for ShardedKey<Address>.

This avoids heap allocation in hot database paths. The key layout is:

  • 20 bytes: Address
  • 8 bytes: BlockNumber (big-endian)

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 28 bytes