pub struct Topic {
pub name: String,
pub triggers: Vec<Trigger>,
pub includes: HashMap<String, bool>,
pub inherits: HashMap<String, bool>,
}Expand description
Topic is a group of triggers.
All triggers belong to a topic, with the default topic being
a special one named “random”. To move the current user into a
different topic, use the {topic} tag, for example
{topic=random}. A user can ONLY match triggers that are defined
in their current topic, or any triggers that are ‘included’ or
‘inherited’ into their current topic.
Fields§
§name: String§triggers: Vec<Trigger>§includes: HashMap<String, bool>§inherits: HashMap<String, bool>Implementations§
Source§impl Topic
impl Topic
pub fn set_includes(&mut self, includes: String)
pub fn set_inherits(&mut self, inherits: String)
pub fn add_trigger(&mut self, trigger: Trigger)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Topic
impl RefUnwindSafe for Topic
impl Send for Topic
impl Sync for Topic
impl Unpin for Topic
impl UnsafeUnpin for Topic
impl UnwindSafe for Topic
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