pub struct PipelineBuilder { /* private fields */ }Implementations§
Source§impl PipelineBuilder
impl PipelineBuilder
pub fn new(id: impl Into<String>) -> Self
Sourcepub fn add_source<S: SourceElement + 'static>(
self,
source: S,
wire: impl FnOnce(&mut S, &Arc<Context>) -> Result<()>,
) -> Result<Self>
pub fn add_source<S: SourceElement + 'static>( self, source: S, wire: impl FnOnce(&mut S, &Arc<Context>) -> Result<()>, ) -> Result<Self>
Registers one more source. wire receives a source-scoped
Context; build detached branches with Context::branch and
commit them with Context::attach. A wiring error aborts the
builder without publishing a partially built pipeline.
Sourcepub fn build(self) -> Arc<Pipeline> ⓘ
pub fn build(self) -> Arc<Pipeline> ⓘ
Finishes construction. At least one PipelineBuilder::add_source
call must have happened — an empty Pipeline has nothing for
Pipeline::run to ever drive, and Pipeline::bus would block
forever waiting for a source thread that will never start (nothing
left holding a Bus sender to eventually drop).
Auto Trait Implementations§
impl !RefUnwindSafe for PipelineBuilder
impl !Sync for PipelineBuilder
impl !UnwindSafe for PipelineBuilder
impl Freeze for PipelineBuilder
impl Send for PipelineBuilder
impl Unpin for PipelineBuilder
impl UnsafeUnpin for PipelineBuilder
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