pub struct Freactor {
pub funcs: Arc<HashMap<String, Arc<dyn Fn(Arc<Mutex<State>>) -> Pin<Box<dyn Future<Output = Result<Code, Box<dyn Error + Send>>> + Send + 'static>> + Send + Sync>>>,
pub flow_config: Arc<FlowConfig>,
}Fields§
§funcs: Arc<HashMap<String, Arc<dyn Fn(Arc<Mutex<State>>) -> Pin<Box<dyn Future<Output = Result<Code, Box<dyn Error + Send>>> + Send + 'static>> + Send + Sync>>>§flow_config: Arc<FlowConfig>Implementations§
source§impl Freactor
impl Freactor
pub fn new( func_map: Vec<(String, Arc<dyn Fn(Arc<Mutex<State>>) -> Pin<Box<dyn Future<Output = Result<Code, Box<dyn Error + Send>>> + Send + 'static>> + Send + Sync>)>, flow_config_str: String, ) -> Self
pub async fn run( &self, task_name: &str, states: Arc<Mutex<State>>, ) -> Result<(), Box<dyn Error + Send>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Freactor
impl !RefUnwindSafe for Freactor
impl Send for Freactor
impl Sync for Freactor
impl Unpin for Freactor
impl !UnwindSafe for Freactor
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)