pub enum AppEvent {
Emit {
name: String,
value_bytes: Vec<u8>,
},
Notify {
name: String,
},
}Expand description
App-Op-emitted events surfaced as EngineStep::AppEvent.
Application code constructs these via AppEvent::emit /
AppEvent::notify which reject framework-reserved topic
prefixes (bb., ai.bytesandbrains.) so the framework’s own
InfraEvent topic namespace can never be impersonated by user
publish calls (closes the trust-boundary requirement
in §Trust boundary). The struct variants stay constructible
directly for framework-internal forwarding paths that are not
crossing the application boundary.
Variants§
Emit
AppEmit(name, value_bytes) - full app event carrying bytes.
Notify
AppNotify(name) - marker-only notification.
Implementations§
Source§impl AppEvent
impl AppEvent
Sourcepub fn emit(
name: impl Into<String>,
value_bytes: Vec<u8>,
) -> Result<AppEvent, AppEventError>
pub fn emit( name: impl Into<String>, value_bytes: Vec<u8>, ) -> Result<AppEvent, AppEventError>
Construct an AppEvent::Emit, rejecting framework-reserved
topic prefixes. The trust boundary AppEvent::new referenced
in docs-plan/CORRECTED_ARCHITECTURE.md §Trust boundary.
Sourcepub fn notify(name: impl Into<String>) -> Result<AppEvent, AppEventError>
pub fn notify(name: impl Into<String>) -> Result<AppEvent, AppEventError>
Construct an AppEvent::Notify, rejecting framework-
reserved topic prefixes. See Self::emit.