pub struct StreamRule {
pub name: String,
pub description: String,
pub matcher: Regex,
pub scope: RuleScope,
pub mode: RuleMode,
pub body: String,
}Expand description
A compiled stream rule loaded from ~/.roma/rules/<name>.md.
Fields§
§name: StringFile stem of the rule file.
description: StringFrontmatter description.
matcher: RegexCompiled frontmatter match pattern.
scope: RuleScopeWhich stream content this rule matches against.
mode: RuleModeWhat happens when this rule matches.
body: StringMarkdown body — the text injected when the rule fires.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StreamRule
impl RefUnwindSafe for StreamRule
impl Send for StreamRule
impl Sync for StreamRule
impl Unpin for StreamRule
impl UnsafeUnpin for StreamRule
impl UnwindSafe for StreamRule
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