pub struct IterableStorage<'a, T: DeserializeOwned + Serialize> { /* private fields */ }
Expand description

Stores items in a way that allows for iterating over them.

Implementations

Creates an instance for the given namespace. The following namespaces are reserved by IterableStorage:

  • ns + “index”
  • ns + N - where N is a number

Returns the index at which the item is stored at.

Removes the item at the end of the collection.

Returns true if the item was updated and false if no item is stored at that index.

Removes the element at the given index. The removed element is replaced by the last element of the storage. Does not preserve ordering. Returns the item that was swapped if such was necessary.

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.

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.