pub struct Trigger {
pub trigger: String,
pub reply: Vec<String>,
pub condition: Vec<Condition>,
pub redirect: String,
pub previous: String,
}Expand description
Trigger represents a pattern that matches a user’s message.
It is the base unit of intelligence for your chatbot. A trigger of “hello bot” will match when the user says that phrase, and can pair a set of replies (multiple OK, which will be chosen at random) to be sent when that trigger is matched.
Fields§
§trigger: String§reply: Vec<String>§condition: Vec<Condition>§redirect: String§previous: StringImplementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Trigger
impl RefUnwindSafe for Trigger
impl Send for Trigger
impl Sync for Trigger
impl Unpin for Trigger
impl UnsafeUnpin for Trigger
impl UnwindSafe for Trigger
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more