pub trait AsComponentIds<Marker> {
// Required method
fn as_component_ids(&self) -> impl Iterator<Item: AsRef<str>>;
}Expand description
Conversion into an iterator of component IDs.
Intended for use in methods that accept component IDs as string references, where a single or multiple IDs may be passed within a single parameter. This allows being generic over those possibilities such that callers can use more natural values rather than contrived values (such as always having to wrap a single string in a slice, etc).
Required Methods§
Sourcefn as_component_ids(&self) -> impl Iterator<Item: AsRef<str>>
fn as_component_ids(&self) -> impl Iterator<Item: AsRef<str>>
Converts self into an iterator of component output IDs.
This borrows self – rather than consuming it as the into_ prefix would normally imply – so that the
iterator can be built multiple times from the same value, which is necessary for connecting every upstream ID
to every downstream ID when making many-to-many connections.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".