Trait Pred

Source
pub trait Pred: View
where Self::V: SpecPred<Input = <Self::InputOwned as View>::V>,
{ type Input<'a>: View<V = <Self::InputOwned as View>::V>; type InputOwned: View; // Required method fn apply(&self, i: &Self::Input<'_>) -> bool; }
Expand description

All predicates to be used in Refined combinator must implement this trait.

Required Associated Types§

Source

type Input<'a>: View<V = <Self::InputOwned as View>::V>

The input type of the predicate.

Source

type InputOwned: View

The owned version of the input type.

Required Methods§

Source

fn apply(&self, i: &Self::Input<'_>) -> bool

Applies the predicate to the input.

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.

Implementors§

Source§

impl Pred for IA5StringPred

Source§

impl Pred for MinimalBigIntPred

Source§

type Input<'a> = &'a [u8]

Source§

type InputOwned = Vec<u8>

Source§

impl Pred for PrintableStringPred

Source§

impl<'a> Pred for TagPred<&'a [u8]>

Source§

type Input<'b> = &'b [u8]

Source§

type InputOwned = Vec<u8>

Source§

impl<T> Pred for TagPred<T>
where T: FromToBytes,

Source§

type Input<'a> = T

Source§

type InputOwned = T

Source§

impl<const N: usize> Pred for TagPred<[u8; N]>

Source§

type Input<'b> = &'b [u8]

Source§

type InputOwned = Vec<u8>