Struct diem_secure_storage::InMemoryStorage[][src]

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

InMemoryStorage represents a key value store that is purely in memory and intended for single threads (or must be wrapped by a Arc<RwLock<>>). This provides no permission checks and simply is a proof of concept to unblock building of applications without more complex data stores. Internally, it retains all data, which means that it must make copies of all key material which violates the Diem code base. It violates it because the anticipation is that data stores would securely handle key material. This should not be used in production.

Implementations

Trait Implementations

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

Performs the conversion.

Returns an error if the backend service is not online and available.

Retrieves a value from storage and fails if the backend is unavailable or the process has invalid permissions. Read more

Sets a value in storage and fails if the backend is unavailable or the process has invalid permissions. Read more

Resets and clears all data held in the storage engine. Note: this should only be exposed and used for testing. Resetting the storage engine is not something that should be supported in production. Read more

The type returned in the event of a conversion error.

Performs the conversion.

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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

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.