pub enum Routine {
WithoutContext(Rc<dyn Fn((Args, Props)) -> Result<()>>),
WithContext(Rc<dyn Fn((Args, Props), Context) -> Result<()>>),
}Expand description
Routine handle.
let routine = Routine::new
(
|( args, props )|
{
// Do what you need to do
Ok( () )
}
);let routine = Routine::new_with_ctx
(
| ( args, props ), ctx |
{
// Do what you need to do
Ok( () )
}
);Variants§
WithoutContext(Rc<dyn Fn((Args, Props)) -> Result<()>>)
Routine without context
WithContext(Rc<dyn Fn((Args, Props), Context) -> Result<()>>)
Routine with context
Implementations§
Trait Implementations§
source§impl PartialEq for Routine
impl PartialEq for Routine
impl Eq for Routine
Auto Trait Implementations§
impl !RefUnwindSafe for Routine
impl !Send for Routine
impl !Sync for Routine
impl Unpin for Routine
impl !UnwindSafe for Routine
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