pub struct FactoryVecDeque<C: FactoryComponent> { /* private fields */ }
Expand description

A container similar to VecDeque that can be used to store data associated with components that implement FactoryComponent.

To access mutable methods of the factory, create a guard using Self::guard.

Implementations§

Creates a new FactoryVecDeque.

Provides a FactoryVecDequeGuard that can be used to edit the factory.

The changes will be rendered on the widgets after the guard goes out of scope.

Returns the number of elements in the FactoryVecDeque.

Returns true if the FactoryVecDeque is empty.

Send a message to one of the elements.

Send clone of a message to all of the elements.

Tries to get an immutable reference to the model of one element.

Returns None if index is invalid.

Provides a reference to the model of the back element.

Returns None if the deque is empty.

Provides a reference to the model of the front element.

Returns None if the deque is empty.

Returns the widget all components are attached to.

Returns an iterator over the components.

Creates a FactoryVecDeque from a Vec

Trait Implementations§

Implements the Clone Trait for FactoryVecDeque<C> where C is Cloneable

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Executes the destructor for this type. Read more
The returned type after indexing.
Performs the indexing (container[index]) operation. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Returns the position. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

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

Calls U::from(self).

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

Returns the position. Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more