pub struct BoundCliSpec<R> { /* private fields */ }Expand description
A built registry with exactly one handler per action.
Implementations§
Source§impl<R> BoundCliSpec<R>
impl<R> BoundCliSpec<R>
pub fn resolve_from<I, S>(&self, args: I) -> Result<CliOutcome, CliError>
Sourcepub fn execute(&self, invocation: &ResolvedInvocation) -> R
pub fn execute(&self, invocation: &ResolvedInvocation) -> R
Run the handler bound to this invocation’s action.
bind_actions proved at startup that every action id has exactly one
handler, so this lookup cannot miss. The allow records that proof
instead of inventing a fallback value of a caller-chosen type R.
Auto Trait Implementations§
impl<R> Freeze for BoundCliSpec<R>
impl<R> RefUnwindSafe for BoundCliSpec<R>
impl<R> Send for BoundCliSpec<R>
impl<R> Sync for BoundCliSpec<R>
impl<R> Unpin for BoundCliSpec<R>
impl<R> UnsafeUnpin for BoundCliSpec<R>
impl<R> UnwindSafe for BoundCliSpec<R>
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