Trait RuleExt

Source
pub trait RuleExt<Input, Msg>: Sealed<Input> {
    // Required methods
    fn and<R>(self, other: R) -> RuleList<Input, Msg>
       where R: CoreRule<Input, (), Message = Msg>;
    fn custom<F, V>(self, other: F) -> RuleList<Input, Msg>
       where F: for<'a> FnOnce(&'a mut V) -> Result<(), Msg> + CoreRule<Input, V, Message = Msg>,
             V: FromValue + 'static;
}
Expand description

Rule extension, it can coupling some rules, such as

Rule1.and(Rule2).and(Rule3)

Required Methods§

Source

fn and<R>(self, other: R) -> RuleList<Input, Msg>
where R: CoreRule<Input, (), Message = Msg>,

Source

fn custom<F, V>(self, other: F) -> RuleList<Input, Msg>
where F: for<'a> FnOnce(&'a mut V) -> Result<(), Msg> + CoreRule<Input, V, Message = Msg>, V: FromValue + 'static,

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<R, Input, Msg> RuleExt<Input, Msg> for R
where R: CoreRule<Input, (), Message = Msg>, Msg: 'static,