pub struct TowerRule {
pub schema_version: SchemaVersion,
pub id: RuleId,
pub name: String,
pub predicate: Predicate,
pub trigger: Trigger,
pub debounce_ms: Option<u64>,
pub federation: FederationPolicy,
pub enabled: bool,
}Expand description
A complete tower rule: a structured predicate over scryer events paired with a trigger that fires when the predicate matches.
Authored as YAML in .yah/cloud/rules/<name>.yaml and loaded by the tower
daemon at boot. Edits are hot-reloaded via the config-file watcher (F6).
Fields§
§schema_version: SchemaVersionWire-format version; defaults to V1 for backward compat with rule files authored before schema versioning was introduced.
id: RuleIdStable rule identifier. Used for dedup, audit trail keys, and CLI
references. Should be a kebab-case slug, e.g. "yubaba-quorum-loss".
name: StringHuman-readable rule name shown in the desktop UI and CLI.
predicate: PredicateStructured predicate compiled into a scryer subscription filter.
trigger: TriggerWhat tower does when the predicate matches.
debounce_ms: Option<u64>Suppress re-firing within this window (milliseconds) after a successful
dispatch. None fires on every individual match with no rate limiting.
federation: FederationPolicyWhich machines’ scryer instances this rule subscribes to.
enabled: boolWhether this rule is active. Disabled rules are loaded but not subscribed — useful for authoring and dry-run (tower.simulate).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TowerRule
impl<'de> Deserialize<'de> for TowerRule
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl StructuralPartialEq for TowerRule
Source§impl TS for TowerRule
impl TS for TowerRule
Source§const DOCS: Option<&'static str>
const DOCS: Option<&'static str>
TS is derived, docs are
automatically read from your doc comments or #[doc = ".."] attributesSource§type WithoutGenerics = TowerRule
type WithoutGenerics = TowerRule
WithoutGenerics should just be Self.
If the type does have generic parameters, then all generic parameters must be replaced with
a dummy type, e.g ts_rs::Dummy or ().
The only requirement for these dummy types is that EXPORT_TO must be None. Read moreSource§fn decl_concrete() -> String
fn decl_concrete() -> String
TS::decl().
If this type is not generic, then this function is equivalent to TS::decl().Source§fn decl() -> String
fn decl() -> String
type User = { user_id: number, ... }.
This function will panic if the type has no declaration. Read moreSource§fn inline() -> String
fn inline() -> String
{ user_id: number }.
This function will panic if the type cannot be inlined.Source§fn inline_flattened() -> String
fn inline_flattened() -> String
This function will panic if the type cannot be flattened.
Source§fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn output_path() -> Option<&'static Path>
fn output_path() -> Option<&'static Path>
T should be exported.The returned path does not include the base directory from
TS_RS_EXPORT_DIR. Read moreSource§fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn dependencies() -> Vec<Dependency>where
Self: 'static,
fn dependencies() -> Vec<Dependency>where
Self: 'static,
Source§fn export() -> Result<(), ExportError>where
Self: 'static,
fn export() -> Result<(), ExportError>where
Self: 'static,
TS::export_all. Read moreSource§fn export_all() -> Result<(), ExportError>where
Self: 'static,
fn export_all() -> Result<(), ExportError>where
Self: 'static,
To export only this type, without its dependencies, use
TS::export. Read moreSource§fn export_all_to(out_dir: impl AsRef<Path>) -> Result<(), ExportError>where
Self: 'static,
fn export_all_to(out_dir: impl AsRef<Path>) -> Result<(), ExportError>where
Self: 'static,
To export only this type, without its dependencies, use
TS::export. Read more