pub struct ChainGeneric<T> {
pub branches: Vec<Branch<T>>,
/* private fields */
}Fields§
§branches: Vec<Branch<T>>Implementations§
Source§impl<T: 'static + Send> ChainGeneric<T>
impl<T: 'static + Send> ChainGeneric<T>
pub fn new() -> Self
pub fn add_link( &mut self, link: Arc<dyn Fn(T) -> Pin<Box<dyn Future<Output = T> + Send>> + Send + Sync>, )
pub fn use_middleware(&mut self, mw: Arc<dyn Middleware<T>>)
pub fn link_count(&self) -> usize
pub fn connect<F>(&mut self, source: usize, target: usize, condition: F)
pub async fn run(&self, ctx: T) -> T
Auto Trait Implementations§
impl<T> Freeze for ChainGeneric<T>
impl<T> !RefUnwindSafe for ChainGeneric<T>
impl<T> Send for ChainGeneric<T>
impl<T> Sync for ChainGeneric<T>
impl<T> Unpin for ChainGeneric<T>
impl<T> !UnwindSafe for ChainGeneric<T>
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