HostPollable

Trait HostPollable 

Source
pub trait HostPollable: Sized {
    // Required methods
    fn can_poll(port_type: Option<&TypeExpr>) -> bool;
    fn decode(
        handle: &HostBridgeHandle,
        port: &str,
        port_type: Option<&TypeExpr>,
        payload: CorrelatedPayload,
    ) -> Result<Self, NodeError>;
}
Expand description

Trait used by HostPort::can_poll::<T>() and HostPort::try_pop::<T>().

Required Methods§

Source

fn can_poll(port_type: Option<&TypeExpr>) -> bool

Source

fn decode( handle: &HostBridgeHandle, port: &str, port_type: Option<&TypeExpr>, payload: CorrelatedPayload, ) -> Result<Self, NodeError>

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.

Implementations on Foreign Types§

Source§

impl HostPollable for Value

Source§

fn can_poll(_port_type: Option<&TypeExpr>) -> bool

Source§

fn decode( _handle: &HostBridgeHandle, port: &str, _port_type: Option<&TypeExpr>, payload: CorrelatedPayload, ) -> Result<Self, NodeError>

Source§

impl HostPollable for DynamicImage

Source§

fn can_poll(port_type: Option<&TypeExpr>) -> bool

Source§

fn decode( handle: &HostBridgeHandle, port: &str, _port_type: Option<&TypeExpr>, payload: CorrelatedPayload, ) -> Result<Self, NodeError>

Implementors§