pub trait PeatObserver: Send + Sync {
// Required method
fn on_event(&self, event: PeatEvent);
}Expand description
Observer trait for receiving Peat mesh events
Implement this trait to receive callbacks when mesh events occur. Observers must be thread-safe (Send + Sync) as they may be called from any thread.
§Platform Notes
- iOS/macOS: Wrap in a Swift class that conforms to this protocol via UniFFI
- Android: Implement via JNI callback interface
- ESP32: Use direct Rust implementation with static callbacks
Required Methods§
Implementors§
impl PeatObserver for CollectingObserver
Available on crate feature
std only.