Skip to main content

ProcessNode

Trait ProcessNode 

Source
pub trait ProcessNode {
    type NextNodes: NextNodes;
    type RuntimeData: Send + Copy;
    type Errors: ErrorCounters;

    // Required method
    fn function(
        &self,
        vm: &mut MainRef,
        node: &mut NodeRuntimeRef<Self>,
    ) -> impl Future<Output = ()>;
}
Available on crate feature process-node only.
Expand description

Trait for defining a VPP process (async) node

Required Associated Types§

Source

type NextNodes: NextNodes

Type defining the next nodes of this node

Typically an enum using the vpp_plugin_macros::NextNodes derive macro.

Source

type RuntimeData: Send + Copy

Type defining the runtime data of this node

This data is per-node instance and per-thread.

Source

type Errors: ErrorCounters

Type defining the error counters of this node

Typically an enum using the vpp_plugin_macros::ErrorCounters derive macro.

Required Methods§

Source

fn function( &self, vm: &mut MainRef, node: &mut NodeRuntimeRef<Self>, ) -> impl Future<Output = ()>

The main async coroutine for this process node

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§