pub enum ComponentRole {
Source,
Processor,
Sink,
Filter,
Router,
}Expand description
The role of a component within a pipeline topology.
Per consolidated review (Doc 10, C02-7, C04-4): ComponentRole is the
canonical name, replacing NodeRole (Doc 02) and StageRole (Doc 04).
§Examples
use torvyn_types::ComponentRole;
let role = ComponentRole::Processor;
assert_eq!(format!("{}", role), "Processor");Variants§
Source
Produces stream elements by pulling from an external data source.
Processor
Transforms stream elements (1:1 input-to-output mapping).
Sink
Consumes stream elements by writing to an external destination.
Filter
Evaluates whether elements pass a predicate (accept/reject, no new buffer).
Router
Routes elements to one or more named output ports.
Implementations§
Source§impl ComponentRole
impl ComponentRole
Sourcepub const fn is_producer(&self) -> bool
pub const fn is_producer(&self) -> bool
Returns true if this role produces stream elements.
§COLD PATH — called during topology validation.
Sourcepub const fn is_consumer(&self) -> bool
pub const fn is_consumer(&self) -> bool
Returns true if this role consumes stream elements.
§COLD PATH — called during topology validation.
Trait Implementations§
Source§impl Clone for ComponentRole
impl Clone for ComponentRole
Source§fn clone(&self) -> ComponentRole
fn clone(&self) -> ComponentRole
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ComponentRole
impl Debug for ComponentRole
Source§impl<'de> Deserialize<'de> for ComponentRole
impl<'de> Deserialize<'de> for ComponentRole
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ComponentRole
impl Display for ComponentRole
Source§impl Hash for ComponentRole
impl Hash for ComponentRole
Source§impl PartialEq for ComponentRole
impl PartialEq for ComponentRole
Source§impl Serialize for ComponentRole
impl Serialize for ComponentRole
impl Copy for ComponentRole
impl Eq for ComponentRole
impl StructuralPartialEq for ComponentRole
Auto Trait Implementations§
impl Freeze for ComponentRole
impl RefUnwindSafe for ComponentRole
impl Send for ComponentRole
impl Sync for ComponentRole
impl Unpin for ComponentRole
impl UnwindSafe for ComponentRole
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more