Skip to main content

OutputPacketValidator

Trait OutputPacketValidator 

Source
pub trait OutputPacketValidator: Send + Sync {
    // Required method
    fn validate(
        &self,
        port_id: &PortId,
        packet: &PortPacket,
    ) -> Result<(), PortSendError>;
}
Expand description

Validator invoked before output packets enter downstream graph edges.

Required Methods§

Source

fn validate( &self, port_id: &PortId, packet: &PortPacket, ) -> Result<(), PortSendError>

Validate one output packet for the requested output port.

§Errors

Returns an error when the packet must not be sent.

Implementors§