pub struct PluginOperationRegistrations<'a> { /* private fields */ }Implementations§
Source§impl PluginOperationRegistrations<'_>
impl PluginOperationRegistrations<'_>
pub fn typed_query<Op, F, Fut>(self, handler: F) -> Result<(), PluginError>where
Op: PluginQuery,
F: Fn(PluginQueryContext, Op::Args) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<Op::Output, PluginOperationFailure>> + Send + 'static,
pub fn typed_command<Op, F, Fut>(self, handler: F) -> Result<(), PluginError>where
Op: PluginCommand,
F: Fn(PluginCommandContext, Op::Args) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<PluginCommandOutcome<Op::Output>, PluginOperationFailure>> + Send + 'static,
pub fn typed_command_value<Op, F, Fut>(
self,
handler: F,
) -> Result<(), PluginError>where
Op: PluginCommand,
F: Fn(PluginCommandContext, Op::Args) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<Op::Output, PluginOperationFailure>> + Send + 'static,
pub fn typed_task<Op, F, Fut>(self, handler: F) -> Result<(), PluginError>where
Op: PluginTask,
F: Fn(PluginTaskContext, Op::Args) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<PluginTaskOutcome<Op::Output>, PluginOperationFailure>> + Send + 'static,
pub fn typed_task_value<Op, F, Fut>(self, handler: F) -> Result<(), PluginError>where
Op: PluginTask,
F: Fn(PluginTaskContext, Op::Args) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<Op::Output, PluginOperationFailure>> + Send + 'static,
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for PluginOperationRegistrations<'a>
impl<'a> !UnwindSafe for PluginOperationRegistrations<'a>
impl<'a> Freeze for PluginOperationRegistrations<'a>
impl<'a> Send for PluginOperationRegistrations<'a>
impl<'a> Sync for PluginOperationRegistrations<'a>
impl<'a> Unpin for PluginOperationRegistrations<'a>
impl<'a> UnsafeUnpin for PluginOperationRegistrations<'a>
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