Trait device_connector::element::ElementBuildable
source · pub trait ElementBuildable: Sized + Send + 'static {
type Config: DeserializeOwned;
const NAME: &'static str;
const RECV_PORTS: Port = 0u8;
const SEND_PORTS: Port = 0u8;
fn new(conf: Self::Config) -> Result<Self, Error>;
fn next(
&mut self,
pipeline: &mut Pipeline,
receiver: &mut MsgReceiver
) -> ElementResult;
fn acceptable_msg_types() -> Vec<Vec<MsgType>> { ... }
fn finalizer(&mut self) -> Result<Option<ElementFinalizer>, Error> { ... }
}
Expand description
Buildable element from config.
Required Associated Types§
sourcetype Config: DeserializeOwned
type Config: DeserializeOwned
Configuration type for this element
Required Associated Constants§
Provided Associated Constants§
sourceconst RECV_PORTS: Port = 0u8
const RECV_PORTS: Port = 0u8
The number of receiving ports
sourceconst SEND_PORTS: Port = 0u8
const SEND_PORTS: Port = 0u8
The number of sending ports
Required Methods§
sourcefn next(
&mut self,
pipeline: &mut Pipeline,
receiver: &mut MsgReceiver
) -> ElementResult
fn next(
&mut self,
pipeline: &mut Pipeline,
receiver: &mut MsgReceiver
) -> ElementResult
Get message from receiver
and returns the result of this element.
Provided Methods§
sourcefn acceptable_msg_types() -> Vec<Vec<MsgType>>
fn acceptable_msg_types() -> Vec<Vec<MsgType>>
Returns acceptable message type of this element