pub struct WorkCommand { /* private fields */ }Expand description
The /work command.
Implementations§
Source§impl WorkCommand
impl WorkCommand
pub fn new(state: Arc<dyn WorkCoordinationStore>) -> Self
Trait Implementations§
Source§impl SlashCommand for WorkCommand
impl SlashCommand for WorkCommand
fn run<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
_cmd: &'life1 str,
args: &'life2 str,
call: &'life3 SlashCall<'life4>,
) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Source§fn commands(&self) -> Vec<CommandDef>
fn commands(&self) -> Vec<CommandDef>
The commands this handles, for the platform’s command menu and
/help. Every name here must be one Self::handles accepts.Auto Trait Implementations§
impl !RefUnwindSafe for WorkCommand
impl !UnwindSafe for WorkCommand
impl Forget for WorkCommand
impl Freeze for WorkCommandwhere
*const ArcInner<dyn WorkCoordinationStore> is !null: Freeze,
PhantomData<ArcInner<dyn WorkCoordinationStore>>: Freeze,
impl Move for WorkCommand
impl Send for WorkCommand
impl Sync for WorkCommand
impl Unpin for WorkCommand
impl UnsafeUnpin for WorkCommandwhere
*const ArcInner<dyn WorkCoordinationStore> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn WorkCoordinationStore>>: UnsafeUnpin,
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more