diff options
| author | Jokler <jokler.contact@gmail.com> | 2017-12-15 19:29:40 +0100 |
|---|---|---|
| committer | Jokler <jokler.contact@gmail.com> | 2017-12-15 19:29:40 +0100 |
| commit | 92ea5a1c2e0b7ddaa102d6b602d180e84964c3be (patch) | |
| tree | 6bfed35a56dcf774d5b840552f921723f4556766 | |
| parent | b4c1722bbee9fa822a6063cbb0540c0a7fb2e430 (diff) | |
| download | frippy-92ea5a1c2e0b7ddaa102d6b602d180e84964c3be.tar.gz frippy-92ea5a1c2e0b7ddaa102d6b602d180e84964c3be.zip | |
Adjust documentation
| -rw-r--r-- | src/lib.rs | 4 | ||||
| -rw-r--r-- | src/plugin.rs | 4 | ||||
| -rw-r--r-- | src/plugins/mod.rs | 1 |
3 files changed, 7 insertions, 2 deletions
@@ -56,6 +56,7 @@ pub use irc::error::Error as IrcError; use plugin::*; +/// The bot which contains the main logic. #[derive(Default)] pub struct Bot { plugins: ThreadedPlugins, @@ -77,7 +78,8 @@ impl Bot { Bot { plugins: ThreadedPlugins::new() } } - /// Add plugins which should evaluate incoming messages from IRC. + /// Adds the plugin. + /// These plugins will be used to evaluate incoming messages from IRC. /// /// # Examples /// ``` diff --git a/src/plugin.rs b/src/plugin.rs index d2338f9..d14c129 100644 --- a/src/plugin.rs +++ b/src/plugin.rs @@ -1,3 +1,4 @@ +//! Definitions required for every `Plugin` use std::fmt; use irc::client::prelude::*; @@ -14,7 +15,8 @@ pub trait Plugin: PluginName + Send + Sync + fmt::Debug { fn command(&self, server: &IrcServer, command: PluginCommand) -> Result<(), IrcError>; } -/// `PluginName` is required by `Plugin`. +/// `PluginName` is required by `Plugin`. +/// /// To implement it simply add `#[derive(PluginName)]` /// above the definition of the struct. /// diff --git a/src/plugins/mod.rs b/src/plugins/mod.rs index 3eb7db4..e8c4622 100644 --- a/src/plugins/mod.rs +++ b/src/plugins/mod.rs @@ -1,3 +1,4 @@ +//! Collection of plugins included mod help; mod url; mod emoji; |
