pub struct FactoryVecDequeGuard<'a, C: FactoryComponent> { /* private fields */ }
Expand description

Provides methods to edit the underlying FactoryVecDeque.

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

Implementations§

Drops the guard and renders all changes.

Use this to transfer full ownership back to the FactoryVecDeque.

Tries to get a mutable reference to the model of one element.

Returns None if index is invalid.

Provides a mutable reference to the model of the back element.

Returns None if the deque is empty.

Provides a mutable reference to the model of the front element.

Returns None if the deque is empty.

Removes the last element from the FactoryVecDeque and returns it, or None if it is empty.

Removes the first element from the FactoryVecDeque and returns it, or None if it is empty.

Removes and returns the element at index from the FactoryVecDeque. Returns None if index is out of bounds.

Element at index 0 is the front of the queue.

Appends an element at the end of the FactoryVecDeque.

Prepends an element to the FactoryVecDeque.

Inserts an element at index within the FactoryVecDeque, shifting all elements with indices greater than or equal to index towards the back.

Element at index 0 is the front of the queue.

Panics

Panics if index is greater than FactoryVecDeque’s length.

Swaps elements at indices first and second.

first and second may be equal.

Element at index 0 is the front of the queue.

Panics

Panics if either index is out of bounds.

Moves an element at index current_position to target, shifting all elements between these positions.

current_position and target may be equal.

Element at index 0 is the front of the queue.

Panics

Panics if either index is out of bounds.

Moves an element at index current_position to the front, shifting all elements between these positions.

Panics

Panics if index is out of bounds.

Moves an element at index current_position to the back, shifting all elements between these positions.

Panics

Panics if index is out of bounds.

Remove all components from the FactoryVecDeque.

Returns an iterator over the components that returns mutable references.

Methods from Deref<Target = FactoryVecDeque<C>>§

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.

Trait Implementations§

Formats the value using the given formatter. Read more
The resulting type after dereferencing.
Dereferences the value.
Executes the destructor for this type. Read more
The returned type after indexing.
Performs the indexing (container[index]) operation. Read more
Performs the mutable 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 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