Trait PeekPolicyProvider
pub trait PeekPolicyProvider<Input>:
Send
+ Sync
+ 'static {
// Required method
fn peek_policy(&self, input: &Input) -> PeekPolicy;
}Available on crate feature
std only.Expand description
Selects the PeekPolicy a peeker applies to one input.
Configured on a single peeker, so it affects only that peeker. It is
implemented for a static PeekPolicy and for Fn(&Input) -> PeekPolicy
closures; implement it for a type of your own to reuse one selection
across peekers that see different input types.
Required Methods§
fn peek_policy(&self, input: &Input) -> PeekPolicy
fn peek_policy(&self, input: &Input) -> PeekPolicy
The PeekPolicy to apply while peeking input.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".