pub trait FwdProps:
'static
+ Clone
+ Send
+ Sync
+ for<'de> Deserialize<'de>
+ Serialize
+ Default { }Expand description
Marker trait for types that can be forwarded as props to UI components.
Types implementing this trait can be passed through the AG-UI protocol to frontend components as properties.
§Bounds
'static: Required for async operationsClone: Props may need to be copiedSend + Sync: For thread-safe async operationsSerialize + Deserialize: For JSON serializationDefault: For initializing empty props
§Example
use ag_ui_core::FwdProps;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Serialize, Deserialize)]
struct MyProps {
theme: String,
locale: String,
}
impl FwdProps for MyProps {}Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.