Skip to main content

BspOutputPacker

Trait BspOutputPacker 

Source
pub trait BspOutputPacker {
    // Required methods
    fn output_ports() -> Vec<PortIndex> ⓘ;
    fn pack(
        self,
        node_id: NodeId,
        node_name: &str,
    ) -> Result<NodeOutcome, BspError>;

    // Provided methods
    fn pack_outputs(
        self,
        node_id: NodeId,
        node_name: &str,
    ) -> Result<IndexMap<PortIndex, BspValue>, BspError>
       where Self: Sized { ... }
    fn is_dynamic() -> bool { ... }
}
Expand description

Standardized boundary compiler that converts functional return types into NodeOutcome.

Required Methods§

Source

fn output_ports() -> Vec<PortIndex> ⓘ

Source

fn pack(self, node_id: NodeId, node_name: &str) -> Result<NodeOutcome, BspError>

Provided Methods§

Source

fn pack_outputs( self, node_id: NodeId, node_name: &str, ) -> Result<IndexMap<PortIndex, BspValue>, BspError>
where Self: Sized,

Packs typed outputs into the raw port map — the form crate::node::DataflowNode implementors return.

The default routes through BspOutputPacker::pack; a Suspend outcome has no port map and is rejected as a validation error (dataflow nodes never suspend — suspend-capable nodes implement crate::node::BspNode directly).

Source

fn is_dynamic() -> bool

Returns whether this output compiles dynamic outputs that bypass static validation checks.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl BspOutputPacker for ()

Source§

fn output_ports() -> Vec<PortIndex> ⓘ

Source§

fn pack( self, _node_id: NodeId, _node_name: &str, ) -> Result<NodeOutcome, BspError>

Source§

impl BspOutputPacker for String

Source§

fn output_ports() -> Vec<PortIndex> ⓘ

Source§

fn pack( self, _node_id: NodeId, _node_name: &str, ) -> Result<NodeOutcome, BspError>

Source§

impl BspOutputPacker for Value

Source§

fn output_ports() -> Vec<PortIndex> ⓘ

Source§

fn pack( self, _node_id: NodeId, _node_name: &str, ) -> Result<NodeOutcome, BspError>

Source§

impl BspOutputPacker for bool

Source§

fn output_ports() -> Vec<PortIndex> ⓘ

Source§

fn pack( self, _node_id: NodeId, _node_name: &str, ) -> Result<NodeOutcome, BspError>

Source§

impl BspOutputPacker for f64

Source§

fn output_ports() -> Vec<PortIndex> ⓘ

Source§

fn pack( self, _node_id: NodeId, _node_name: &str, ) -> Result<NodeOutcome, BspError>

Source§

impl BspOutputPacker for i64

Source§

fn output_ports() -> Vec<PortIndex> ⓘ

Source§

fn pack( self, _node_id: NodeId, _node_name: &str, ) -> Result<NodeOutcome, BspError>

Source§

impl<T1, T2, T3> BspOutputPacker for (T1, T2, T3)
where T1: BspToValue + 'static, T2: BspToValue + 'static, T3: BspToValue + 'static,

Source§

fn output_ports() -> Vec<PortIndex> ⓘ

Source§

fn pack( self, _node_id: NodeId, _node_name: &str, ) -> Result<NodeOutcome, BspError>

Source§

impl<T1, T2> BspOutputPacker for (T1, T2)
where T1: BspToValue + 'static, T2: BspToValue + 'static,

Source§

fn output_ports() -> Vec<PortIndex> ⓘ

Source§

fn pack( self, _node_id: NodeId, _node_name: &str, ) -> Result<NodeOutcome, BspError>

Source§

impl<T: Any + Send + Sync> BspOutputPacker for Arc<T>

Source§

fn output_ports() -> Vec<PortIndex> ⓘ

Source§

fn pack( self, _node_id: NodeId, _node_name: &str, ) -> Result<NodeOutcome, BspError>

Source§

impl<T: BspOutputPacker, E: Display> BspOutputPacker for Result<T, E>

Source§

impl<T: BspToValue + 'static> BspOutputPacker for Option<T>

Source§

fn output_ports() -> Vec<PortIndex> ⓘ

Source§

fn pack( self, _node_id: NodeId, _node_name: &str, ) -> Result<NodeOutcome, BspError>

Source§

impl<T: BspToValue + Send + Sync + 'static> BspOutputPacker for Vec<T>

Source§

fn output_ports() -> Vec<PortIndex> ⓘ

Source§

fn pack( self, _node_id: NodeId, _node_name: &str, ) -> Result<NodeOutcome, BspError>

Implementors§