pub struct InputPipelineAssembly { /* private fields */ }Expand description
An input pipeline assembly.
Represents a partial stage of the input pipeline which accepts inputs through an asynchronous sender channel, and emits outputs through an asynchronous receiver channel. Use [new] to create a new assembly. Use [add_handler], or [add_all_handlers] to add the input pipeline handlers to use. When done, InputPipeline::new can be used to make a new input pipeline.
§Implementation notes
Internally, when a new InputPipelineAssembly is created with multiple [InputHandler]s, the handlers are connected together using async queues. This allows fully streamed processing of input events, and also allows some pipeline stages to generate events spontaneously, i.e. without an external stimulus.
Implementations§
Source§impl InputPipelineAssembly
impl InputPipelineAssembly
Sourcepub fn new(metrics_logger: MetricsLogger) -> Self
pub fn new(metrics_logger: MetricsLogger) -> Self
Create a new but empty InputPipelineAssembly. Use [add_handler] or similar to add new handlers to it.
Sourcepub fn add_handler(self, handler: Rc<dyn BatchInputHandler>) -> Self
pub fn add_handler(self, handler: Rc<dyn BatchInputHandler>) -> Self
Adds another input_handler::BatchInputHandler into the InputPipelineAssembly. The handlers
are invoked in the order they are added. Returns Self for chaining.
Sourcepub fn add_all_handlers(self, handlers: Vec<Rc<dyn BatchInputHandler>>) -> Self
pub fn add_all_handlers(self, handlers: Vec<Rc<dyn BatchInputHandler>>) -> Self
Adds all handlers into the assembly in the order they appear in handlers.
pub fn add_display_ownership( self, display_ownership_event: Event, input_handlers_node: &Node, ) -> InputPipelineAssembly
pub fn add_focus_listener( self, focus_chain_publisher: FocusChainProviderPublisher, ) -> Self
Auto Trait Implementations§
impl Freeze for InputPipelineAssembly
impl !RefUnwindSafe for InputPipelineAssembly
impl !Send for InputPipelineAssembly
impl !Sync for InputPipelineAssembly
impl Unpin for InputPipelineAssembly
impl !UnwindSafe for InputPipelineAssembly
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
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
T to [Self]Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more