Skip to main content

Oracle

Trait Oracle 

Source
pub trait Oracle<Candidate> {
    // Required method
    fn accepts(&self, candidate: &Candidate) -> bool;
}
Expand description

A predicate that marks valid candidates, the oracle of a quantum search.

Required Methods§

Source

fn accepts(&self, candidate: &Candidate) -> bool

Whether candidate is a solution.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§