pub trait Searchable {
// Required methods
fn search_space() -> SearchSpace;
fn from_sample(params: &HashMap<String, Value>) -> Result<Self>
where Self: Sized;
fn current_params(&self) -> HashMap<String, Value>;
}Expand description
Trait for filters that declare their search space.
Auto-generated by #[derive(Filter)].
Required Methods§
Sourcefn search_space() -> SearchSpace
fn search_space() -> SearchSpace
The dimensions this filter exposes for search, one per field
annotated with a #[soma(search(...))] range. Names are the
bare field names — a graph namespaces them per node via
SearchSpace::merge_with_prefix.
Sourcefn from_sample(params: &HashMap<String, Value>) -> Result<Self>where
Self: Sized,
fn from_sample(params: &HashMap<String, Value>) -> Result<Self>where
Self: Sized,
Build an instance from a sampled configuration — how a trial’s
sampled point becomes a runnable filter. Params are keyed by
bare field name; in the derived impl a missing or
wrongly-typed key falls back to the type’s Default, never an
error (the Result is for hand-written impls with real
construction failures).
Sourcefn current_params(&self) -> HashMap<String, Value>
fn current_params(&self) -> HashMap<String, Value>
The instance’s current searchable field values, keyed by bare
field name — the inverse of Searchable::from_sample, used
to record what configuration actually ran.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.