pub struct ThreadDataStorage<S, T> { /* private fields */ }
Expand description

A Storage-Container for Thread Local Data

Implementations

Creates a new Instance using the Trie StorageBackend

Creates a new Instance using the List StorageBackend

Creates a new Instance which uses the given Storage-Backend for all the Data.

Use Case

This should only really be used if you want to use a custom StorageBackend with it. Otherwise you should just use ThreadData::<T>::new() to create a ThreadDataStorage instance with the Trie StorageBackend

Attempts to load the stored Data for the current Thread

Attempts to load the stored for the current Thread or creates + stores new Data if it does not currently exist

Trait Implementations

Formats the value using the given formatter. Read more

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

Returns the “default value” for a type. 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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.