pub struct StartupContext<'a> {
pub tables: &'a [TableDefinition],
pub app_configs: &'a [Value],
pub mqtt_enabled: bool,
}Expand description
Read-only context passed to Plugin::is_required().
Fields§
§tables: &'a [TableDefinition]All discovered table definitions across all apps.
app_configs: &'a [Value]All discovered application configs (as raw JSON for introspection).
mqtt_enabled: boolWhether the MQTT interface is enabled (mqtt.enabled in
yeti-config.yaml). The broker requires the auth backend, so a plugin
that provides auth declares itself required when this is set — even when
no app otherwise needs auth.
Implementations§
Source§impl StartupContext<'_>
impl StartupContext<'_>
Sourcepub fn any_app_has_config(&self, key: &str) -> bool
pub fn any_app_has_config(&self, key: &str) -> bool
Check if any application has a given top-level config key (e.g., “auth”, “kafka”).
Sourcepub fn any_table_has_field_directive(&self, directive: &str) -> bool
pub fn any_table_has_field_directive(&self, directive: &str) -> bool
Check if any table has a field whose type matches the given name (case-insensitive).
Sourcepub fn any_app_requires_auth(&self) -> bool
pub fn any_app_requires_auth(&self) -> bool
Check if any application requires authentication (has non-empty required_roles).
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for StartupContext<'a>
impl<'a> RefUnwindSafe for StartupContext<'a>
impl<'a> Send for StartupContext<'a>
impl<'a> Sync for StartupContext<'a>
impl<'a> Unpin for StartupContext<'a>
impl<'a> UnsafeUnpin for StartupContext<'a>
impl<'a> UnwindSafe for StartupContext<'a>
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