diff options
| author | alex <[email protected]> | 2017-06-14 18:26:01 +0200 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2017-06-14 09:26:01 -0700 |
| commit | 32e07e4ac822d5cc1118f0db0fc92b549c1aaf81 (patch) | |
| tree | a4db15956faac92d544135de6885d64854a8b31d /src/framework/command.rs | |
| parent | Use HTTPS Connector with remaining HTTP functions (diff) | |
| download | serenity-32e07e4ac822d5cc1118f0db0fc92b549c1aaf81.tar.xz serenity-32e07e4ac822d5cc1118f0db0fc92b549c1aaf81.zip | |
Switch from #[doc(hidden)] to pub(crate)
Switch from using `#[doc(hidden)]` to hide some internal functions to
`pub(crate)`.
The library now requires rustc 1.18.
Diffstat (limited to 'src/framework/command.rs')
| -rw-r--r-- | src/framework/command.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/framework/command.rs b/src/framework/command.rs index 6db228f..fcf039a 100644 --- a/src/framework/command.rs +++ b/src/framework/command.rs @@ -9,12 +9,10 @@ pub type Exec = Fn(&mut Context, &Message, Vec<String>) -> Result<(), String> + pub type Help = Fn(&mut Context, &Message, HashMap<String, Arc<CommandGroup>>, &[String]) -> Result<(), String> + Send + Sync + 'static; pub type BeforeHook = Fn(&mut Context, &Message, &String) -> bool + Send + Sync + 'static; pub type AfterHook = Fn(&mut Context, &Message, &String, Result<(), String>) + Send + Sync + 'static; -#[doc(hidden)] -pub type InternalCommand = Arc<Command>; +pub(crate) type InternalCommand = Arc<Command>; pub type PrefixCheck = Fn(&mut Context, &Message) -> Option<String> + Send + Sync + 'static; -#[doc(hidden)] -pub enum CommandOrAlias { +pub(crate) enum CommandOrAlias { Alias(String), Command(InternalCommand), } @@ -30,7 +28,7 @@ pub enum CommandType { #[derive(Default)] pub struct CommandGroup { pub prefix: Option<String>, - pub commands: HashMap<String, CommandOrAlias>, + pub(crate) commands: HashMap<String, CommandOrAlias>, } /// Command struct used to store commands internally. @@ -64,8 +62,7 @@ pub struct Command { pub guild_only: bool, /// Whether command can only be used by owners or not. pub owners_only: bool, - #[doc(hidden)] - pub aliases: Vec<String>, + pub(crate) aliases: Vec<String>, } impl Command { |