pub enum VecEvent<T> {
Show 15 variants InitialComplete, Push(T), Pop, Insert(usize, T), Set(usize, T), Remove(usize), SwapRemove(usize), Fill(T), Resize(usize, T), Truncate(usize), Retain(HashSet<usize>), RetainNot(HashSet<usize>), Clear, ShrinkToFit, Done,
}
Expand description

A vector change event.

Variants

InitialComplete

The incremental subscription has reached the value of the observed vector at the time it was subscribed.

Push(T)

An item was added at the end.

Pop

The last item was removed.

Insert(usize, T)

An item was inserted at the given index.

Set(usize, T)

The specified item was modified.

Remove(usize)

The specified item was removed.

SwapRemove(usize)

The specified element was removed and replaced by the last element.

Fill(T)

All vector elements have been set to the specified value.

Resize(usize, T)

The vector has been resized to the specified length.

Truncate(usize)

The vector has been truncated to the specified length.

Retain(HashSet<usize>)

Retain the specified elements.

RetainNot(HashSet<usize>)

Retain the inverse of the specified elements.

Clear

All items were removed.

ShrinkToFit

Shrink capacity to fit.

Done

The vector has reached its final state and no further events will occur.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. 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.

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.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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