Skip to main content

CustomFrame

Trait CustomFrame 

Source
pub trait CustomFrame:
    Any
    + Send
    + Sync
    + Debug {
    // Required methods
    fn kind(&self) -> &'static str;
    fn as_any(&self) -> &dyn Any;
}
Expand description

Extension point for application-defined frame payloads.

Implement this on your own types and wrap them in DataFrame::Custom to pass domain-specific data through a pipeline without forking the core frame enum.

Required Methods§

Source

fn kind(&self) -> &'static str

A static string identifying the concrete frame type (used for logging/dispatch).

Source

fn as_any(&self) -> &dyn Any

Downcasting helper; implementations should return self.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§