pub trait CollectionExtract<S>: Send + Sync {
type Item;
// Required methods
fn extract<'s>(&self, s: &'s S) -> &'s [Self::Item];
fn change_source(&self) -> ChangeSource;
// Provided method
fn contains(&self, _s: &S, _item: &Self::Item) -> bool { ... }
}Expand description
Extracts a slice of entities from the solution.
The associated type Item names the entity type, allowing callers to
write E: CollectionExtract<S, Item = A> when A must be inferred from E
rather than stated as a separate generic parameter.
Required Associated Types§
Required Methods§
Sourcefn extract<'s>(&self, s: &'s S) -> &'s [Self::Item]
fn extract<'s>(&self, s: &'s S) -> &'s [Self::Item]
Extracts the entity slice from the solution.
Sourcefn change_source(&self) -> ChangeSource
fn change_source(&self) -> ChangeSource
The descriptor that owns this source’s rows, or Static when no
planning-variable change can alter them. Macro-generated solution source
methods attach it through hidden internal support.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".