use crate::{
core::{Handler, HandlerInput, Predicate, TryFromInput},
dialogue::{decorator::DialogueDecorator, predicate::DialoguePredicate},
};
pub trait DialogueExt<P, PI, HI, HS>: Sized {
#[allow(clippy::type_complexity)]
fn with_dialogue<B>(
self,
predicate: P,
) -> Predicate<DialoguePredicate<B, P, PI, HS>, HandlerInput, DialogueDecorator<B, Self, HI, HS>, HandlerInput>
{
Predicate::new(DialoguePredicate::new(predicate), DialogueDecorator::new(self))
}
}
impl<P, PI, H, HI, HS> DialogueExt<P, PI, HI, HS> for H
where
P: Handler<PI>,
PI: TryFromInput,
H: Handler<HI>,
HI: TryFromInput,
{
}