pub trait PortData: PlatformData {
// Provided methods
fn handle_message(&mut self, message: &Message) -> PortResult { ... }
fn get_owner_pid(&self) -> Option<u32> { ... }
fn set_owner_pid(&mut self, _pid: u32) { ... }
fn is_active(&self) -> bool { ... }
fn set_active(&mut self, _active: bool) { ... }
}Expand description
Trait for port data types to implement cleanup and message handling
Provided Methods§
Sourcefn handle_message(&mut self, message: &Message) -> PortResult
fn handle_message(&mut self, message: &Message) -> PortResult
Called when the port receives a message
Sourcefn get_owner_pid(&self) -> Option<u32>
fn get_owner_pid(&self) -> Option<u32>
Get the owner PID for this port (if any)
Sourcefn set_owner_pid(&mut self, _pid: u32)
fn set_owner_pid(&mut self, _pid: u32)
Set the owner PID for this port
Sourcefn set_active(&mut self, _active: bool)
fn set_active(&mut self, _active: bool)
Activate/deactivate the port
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.