Struct sewup::rdb::Db[][src]

pub struct Db { /* fields omitted */ }
Expand description

DB is a storage space for an account in a specific block. We can import the storage from a past block, and we only commit the storage into the latest block.

Storage map

| 0th ~ 31th bytes | dynamic size | dynamic size              | dynamic size |
|------------------|--------------|---------------------------|--------------|
| DB header        | Table info   | Table data of first table | ...          |

DB Header

The fist 32 bytes are reserved as header of the store,

| 0th            | 1st          | 2nd ~ 3rd         | ... | 28th ~ 31st              |
|----------------|--------------|-------------------|-----|--------------------------|
| Sewup Features | version (BE) | RDB Features (LE) | -   | length of TableInfo (BE) |

Base on the features, the storage may have different encoding in to binary

Implementations

The version of current storage

The feature enabled in current storage

create table for storage

get table with date loaded

drop table

get the numbers of tables

Trait Implementations

Returns the “default value” for a type. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.