pub trait ElementBuildable: Sized + Send + 'static {
    type Config: DeserializeOwned;

    const NAME: &'static str;
    const RECV_PORTS: Port = 0u8;
    const SEND_PORTS: Port = 0u8;

    // Required methods
    fn new(conf: Self::Config) -> Result<Self, Error>;
    fn next(
        &mut self,
        pipeline: &mut Pipeline,
        receiver: &mut MsgReceiver
    ) -> ElementResult;

    // Provided methods
    fn acceptable_msg_types() -> Vec<Vec<MsgType>> { ... }
    fn finalizer(&mut self) -> Result<Option<ElementFinalizer>, Error> { ... }
}
Expand description

Buildable element from config.

Required Associated Types§

source

type Config: DeserializeOwned

Configuration type for this element

Required Associated Constants§

source

const NAME: &'static str

Name of this element. Must be unique in elements

Provided Associated Constants§

source

const RECV_PORTS: Port = 0u8

The number of receiving ports

source

const SEND_PORTS: Port = 0u8

The number of sending ports

Required Methods§

source

fn new(conf: Self::Config) -> Result<Self, Error>

Create element from config

source

fn next( &mut self, pipeline: &mut Pipeline, receiver: &mut MsgReceiver ) -> ElementResult

Get message from receiver and returns the result of this element.

Provided Methods§

source

fn acceptable_msg_types() -> Vec<Vec<MsgType>>

Returns acceptable message type of this element

source

fn finalizer(&mut self) -> Result<Option<ElementFinalizer>, Error>

Returns the finalizer of this element

Implementors§

source§

impl ElementBuildable for FileSinkElement

§

type Config = FileSinkElementConf

source§

const NAME: &'static str = "file-sink"

source§

const RECV_PORTS: Port = 1u8

source§

impl ElementBuildable for FileSrcElement

§

type Config = FileSrcElementConf

source§

const NAME: &'static str = "file-src"

source§

const SEND_PORTS: Port = 1u8

source§

impl ElementBuildable for JsonSplitFilterElement

§

type Config = JsonSplitFilterElementConfig

source§

const NAME: &'static str = "json-split-filter"

source§

const RECV_PORTS: Port = 1u8

source§

const SEND_PORTS: Port = 1u8

source§

impl ElementBuildable for NullSinkElement

§

type Config = EmptyElementConf

source§

const NAME: &'static str = "null-sink"

source§

const RECV_PORTS: Port = 32u8

source§

impl ElementBuildable for PrintLogFilterElement

§

type Config = PrintLogFilterElementConf

source§

const NAME: &'static str = "print-log-filter"

source§

const RECV_PORTS: Port = 1u8

source§

const SEND_PORTS: Port = 1u8

source§

impl ElementBuildable for ProcessSrcElement

§

type Config = ProcessSrcElementConf

source§

const NAME: &'static str = "process-src"

source§

const SEND_PORTS: Port = 1u8

source§

impl ElementBuildable for RepeatProcessSrcElement

§

type Config = RepeatProcessSrcElementConf

source§

const NAME: &'static str = "repeat-process-src"

source§

const SEND_PORTS: Port = 1u8

source§

impl ElementBuildable for SplitByDelimiterFilterElement

§

type Config = SplitByDelimiterFilterElementConfig

source§

const NAME: &'static str = "split-by-delimiter-filter"

source§

const RECV_PORTS: Port = 1u8

source§

const SEND_PORTS: Port = 1u8

source§

impl ElementBuildable for SplitByFixedSizeFilterElement

§

type Config = SplitByFixedSizeFilterElementConfig

source§

const NAME: &'static str = "split-by-fixed-size-filter"

source§

const RECV_PORTS: Port = 1u8

source§

const SEND_PORTS: Port = 1u8

source§

impl ElementBuildable for StatFilterElement

§

type Config = StatFilterElementConf

source§

const NAME: &'static str = "stat-filter"

source§

const RECV_PORTS: Port = 1u8

source§

const SEND_PORTS: Port = 1u8

source§

impl ElementBuildable for StdoutSinkElement

§

type Config = StdoutSinkElementConf

source§

const NAME: &'static str = "stdout-sink"

source§

const RECV_PORTS: Port = 1u8

source§

impl ElementBuildable for TcpSinkElement

§

type Config = TcpSinkElementConf

source§

const NAME: &'static str = "tcp-sink"

source§

const RECV_PORTS: Port = 1u8

source§

impl ElementBuildable for TcpSrcElement

§

type Config = TcpSrcElementConf

source§

const NAME: &'static str = "tcp-src"

source§

const SEND_PORTS: Port = 1u8

source§

impl ElementBuildable for TeeFilterElement

§

type Config = TeeFilterElementConf

source§

const NAME: &'static str = "tee-filter"

source§

const SEND_PORTS: Port = 1u8

source§

const RECV_PORTS: Port = 1u8

source§

impl ElementBuildable for TeeSrcElement

§

type Config = TeeSrcElementConf

source§

const NAME: &'static str = "tee-src"

source§

const SEND_PORTS: Port = 1u8

source§

impl ElementBuildable for TextSrcElement

§

type Config = TextSrcElementConf

source§

const NAME: &'static str = "text-src"

source§

const SEND_PORTS: Port = 1u8

source§

impl ElementBuildable for UdpSinkElement

§

type Config = UdpSinkElementConf

source§

const NAME: &'static str = "udp-sink"

source§

const RECV_PORTS: Port = 1u8

source§

impl ElementBuildable for UdpSrcElement

§

type Config = UdpSrcElementConf

source§

const NAME: &'static str = "udp-src"

source§

const SEND_PORTS: Port = 1u8