pub enum Edition {
Edition2024,
Edition2021,
Edition2018,
Edition2015,
}
Expand description
Represents the Rust edition to use.
Each edition introduces new language features and idioms while maintaining compatibility.
Variants§
Edition2024
Rust 2024 Edition
Edition2021
Rust 2021 Edition
Edition2018
Rust 2018 Edition
Edition2015
Rust 2015 Edition
Trait Implementations§
Source§impl ChoiceParameter for Edition
impl ChoiceParameter for Edition
Source§fn list() -> Vec<CommandParameterChoice>
fn list() -> Vec<CommandParameterChoice>
Returns all possible choices for this parameter, in the order they will appear in Discord.
Source§fn from_index(index: usize) -> Option<Self>
fn from_index(index: usize) -> Option<Self>
Returns an instance of
Self
corresponding to the given index into Self::list()
Source§impl<'de> Deserialize<'de> for Edition
impl<'de> Deserialize<'de> for Edition
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for Edition
impl Eq for Edition
impl StructuralPartialEq for Edition
Auto Trait Implementations§
impl Freeze for Edition
impl RefUnwindSafe for Edition
impl Send for Edition
impl Sync for Edition
impl Unpin for Edition
impl UnwindSafe for Edition
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> CloneDebuggableStorage for Twhere
T: DebuggableStorage + Clone,
impl<T> CloneDebuggableStorage for Twhere
T: DebuggableStorage + Clone,
fn clone_storage(&self) -> Box<dyn CloneDebuggableStorage>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CloneableStorage for T
impl<T> CloneableStorage for T
fn clone_storage(&self) -> Box<dyn CloneableStorage>
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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<'a, T> PopArgument<'a> for Twhere
T: ChoiceParameter,
impl<'a, T> PopArgument<'a> for Twhere
T: ChoiceParameter,
Source§fn pop_from<'life0, 'life1, 'async_trait>(
args: &'a str,
attachment_index: usize,
ctx: &'life0 Context,
msg: &'life1 Message,
) -> Pin<Box<dyn Future<Output = Result<(&'a str, usize, T), (Box<dyn Error + Send + Sync>, Option<String>)>> + Send + 'async_trait>>where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
fn pop_from<'life0, 'life1, 'async_trait>(
args: &'a str,
attachment_index: usize,
ctx: &'life0 Context,
msg: &'life1 Message,
) -> Pin<Box<dyn Future<Output = Result<(&'a str, usize, T), (Box<dyn Error + Send + Sync>, Option<String>)>> + Send + 'async_trait>>where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
Source§impl<T> SlashArgument for Twhere
T: ChoiceParameter,
impl<T> SlashArgument for Twhere
T: ChoiceParameter,
Source§fn extract<'life0, 'life1, 'life2, 'life3, 'async_trait>(
_: &'life0 Context,
_: &'life1 CommandInteraction,
value: &'life2 ResolvedValue<'life3>,
) -> Pin<Box<dyn Future<Output = Result<T, SlashArgError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
T: 'async_trait,
fn extract<'life0, 'life1, 'life2, 'life3, 'async_trait>(
_: &'life0 Context,
_: &'life1 CommandInteraction,
value: &'life2 ResolvedValue<'life3>,
) -> Pin<Box<dyn Future<Output = Result<T, SlashArgError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
T: 'async_trait,
Extract a Rust value of type T from the slash command argument, given via a
serenity::json::Value
. Read moreSource§fn create(builder: CreateCommandOption) -> CreateCommandOption
fn create(builder: CreateCommandOption) -> CreateCommandOption
Create a slash command parameter equivalent to type T. Read more