pub trait SelectionResolver:
Send
+ Sync
+ Debug
+ 'static {
// Required methods
fn id(&self) -> &ResolverId;
fn valid_values(&self) -> Result<IndexSet<SelectionItem>>;
fn describe(&self) -> &str;
// Provided method
fn is_valid(&self, value: &SelectionItem) -> Result<bool> { ... }
}Expand description
Resolves the set of valid values for one external selection.
Embedding systems implement this trait to plug their domain-specific
catalogs (datasets, templates, …) into paramodel. The trait object
lives outside the parameter algebra (see SRD-0004 D15): parameters
hold only the opaque ResolverId, and the registry is consulted at
plan-compilation / binding time.
Required Methods§
Sourcefn id(&self) -> &ResolverId
fn id(&self) -> &ResolverId
Resolver identity.
Sourcefn valid_values(&self) -> Result<IndexSet<SelectionItem>>
fn valid_values(&self) -> Result<IndexSet<SelectionItem>>
Current snapshot of valid values. Cheap to call; implementations may cache internally.
Provided Methods§
Sourcefn is_valid(&self, value: &SelectionItem) -> Result<bool>
fn is_valid(&self, value: &SelectionItem) -> Result<bool>
Membership test. The default delegates to Self::valid_values.