pub struct Pipeline { /* private fields */ }Expand description
Sequential data transformation pipeline.
Implementations§
Source§impl Pipeline
impl Pipeline
Sourcepub fn add_stage(
self,
name: &str,
transform: Box<dyn Fn(Vec<f64>) -> Result<Vec<f64>, HubError>>,
) -> Pipeline
pub fn add_stage( self, name: &str, transform: Box<dyn Fn(Vec<f64>) -> Result<Vec<f64>, HubError>>, ) -> Pipeline
Appends a named stage.
Sourcepub fn execute(&self, input: Vec<f64>) -> Result<Vec<f64>, HubError>
pub fn execute(&self, input: Vec<f64>) -> Result<Vec<f64>, HubError>
Runs all stages in order on the input vector.
Sourcepub fn stage_count(&self) -> usize
pub fn stage_count(&self) -> usize
Number of stages.
Sourcepub fn stage_names(&self) -> Vec<&str>
pub fn stage_names(&self) -> Vec<&str>
Returns the names of all stages in order.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Pipeline
impl !RefUnwindSafe for Pipeline
impl !Send for Pipeline
impl !Sync for Pipeline
impl Unpin for Pipeline
impl UnsafeUnpin for Pipeline
impl !UnwindSafe for Pipeline
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