Struct flutter_rust_bridge::handler::SimpleHandler
source · [−]pub struct SimpleHandler<E: Executor, EH: ErrorHandler> { /* private fields */ }
Expand description
The simple handler uses a simple thread pool to execute tasks.
Implementations
sourceimpl<E: Executor, H: ErrorHandler> SimpleHandler<E, H>
impl<E: Executor, H: ErrorHandler> SimpleHandler<E, H>
Trait Implementations
sourceimpl<E: Executor, EH: ErrorHandler> Handler for SimpleHandler<E, EH>
impl<E: Executor, EH: ErrorHandler> Handler for SimpleHandler<E, EH>
sourcefn wrap<PrepareFn, TaskFn, TaskRet>(
&self,
wrap_info: WrapInfo,
prepare: PrepareFn
) where
PrepareFn: FnOnce() -> TaskFn + UnwindSafe,
TaskFn: FnOnce(TaskCallback) -> Result<TaskRet> + Send + UnwindSafe + 'static,
TaskRet: IntoDart,
fn wrap<PrepareFn, TaskFn, TaskRet>(
&self,
wrap_info: WrapInfo,
prepare: PrepareFn
) where
PrepareFn: FnOnce() -> TaskFn + UnwindSafe,
TaskFn: FnOnce(TaskCallback) -> Result<TaskRet> + Send + UnwindSafe + 'static,
TaskRet: IntoDart,
Prepares the arguments, executes a Rust function and sets up its return value. Read more
sourcefn wrap_sync<SyncTaskFn>(
&self,
wrap_info: WrapInfo,
sync_task: SyncTaskFn
) -> WireSyncReturnStruct where
SyncTaskFn: FnOnce() -> Result<SyncReturn<Vec<u8>>> + UnwindSafe,
fn wrap_sync<SyncTaskFn>(
&self,
wrap_info: WrapInfo,
sync_task: SyncTaskFn
) -> WireSyncReturnStruct where
SyncTaskFn: FnOnce() -> Result<SyncReturn<Vec<u8>>> + UnwindSafe,
Same as wrap
, but the Rust function must return a SyncReturn and
need not implement Send. Read more
Auto Trait Implementations
impl<E, EH> RefUnwindSafe for SimpleHandler<E, EH>
impl<E, EH> Send for SimpleHandler<E, EH> where
E: Send,
impl<E, EH> Sync for SimpleHandler<E, EH> where
E: Sync,
EH: Sync,
impl<E, EH> Unpin for SimpleHandler<E, EH> where
E: Unpin,
EH: Unpin,
impl<E, EH> UnwindSafe for SimpleHandler<E, EH> where
E: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more