aboutsummaryrefslogtreecommitdiff
path: root/src/utils/builder
diff options
context:
space:
mode:
authorAustin Hellyer <[email protected]>2017-01-24 12:07:41 -0800
committerAustin Hellyer <[email protected]>2017-01-24 12:07:41 -0800
commit94131908f00a8cbb714f3a93066e2a83dfc1c5b3 (patch)
tree86cb349c3093ab9722ae47a649deebe8da9d6c13 /src/utils/builder
parentProperly drop on binds (diff)
downloadserenity-94131908f00a8cbb714f3a93066e2a83dfc1c5b3.tar.xz
serenity-94131908f00a8cbb714f3a93066e2a83dfc1c5b3.zip
Fix docs links
Diffstat (limited to 'src/utils/builder')
-rw-r--r--src/utils/builder/create_invite.rs4
-rw-r--r--src/utils/builder/create_message.rs4
-rw-r--r--src/utils/builder/edit_channel.rs6
-rw-r--r--src/utils/builder/edit_profile.rs2
-rw-r--r--src/utils/builder/edit_role.rs14
-rw-r--r--src/utils/builder/execute_webhook.rs4
-rw-r--r--src/utils/builder/search.rs4
7 files changed, 21 insertions, 17 deletions
diff --git a/src/utils/builder/create_invite.rs b/src/utils/builder/create_invite.rs
index c8e175a..0f16b27 100644
--- a/src/utils/builder/create_invite.rs
+++ b/src/utils/builder/create_invite.rs
@@ -26,8 +26,8 @@ use std::default::Default;
/// });
/// ```
///
-/// [`Context::create_invite`]: ../client/struct.Context.html#method.create_invite
-/// [`RichInvite`]: ../model/struct.Invite.html
+/// [`Context::create_invite`]: ../../client/struct.Context.html#method.create_invite
+/// [`RichInvite`]: ../../model/struct.Invite.html
pub struct CreateInvite(pub ObjectBuilder);
impl CreateInvite {
diff --git a/src/utils/builder/create_message.rs b/src/utils/builder/create_message.rs
index 8522130..5386c78 100644
--- a/src/utils/builder/create_message.rs
+++ b/src/utils/builder/create_message.rs
@@ -3,7 +3,7 @@ use std::collections::BTreeMap;
use std::default::Default;
use super::CreateEmbed;
-/// A builder to specify the contents of an [`rest::create_message`] request,
+/// A builder to specify the contents of an [`rest::send_message`] request,
/// primarily meant for use through [`Context::send_message`].
///
/// There are two situations where different field requirements are present:
@@ -31,7 +31,7 @@ use super::CreateEmbed;
/// [`Context::send_message`]: ../../client/struct.Context.html#method.send_message
/// [`content`]: #method.content
/// [`embed`]: #method.embed
-/// [`rest::create_message`]: ../../client/rest/fn.create_message.html
+/// [`rest::send_message`]: ../../client/rest/fn.send_message.html
pub struct CreateMessage(pub BTreeMap<String, Value>);
impl CreateMessage {
diff --git a/src/utils/builder/edit_channel.rs b/src/utils/builder/edit_channel.rs
index 1fd1b5c..e136cbf 100644
--- a/src/utils/builder/edit_channel.rs
+++ b/src/utils/builder/edit_channel.rs
@@ -31,7 +31,7 @@ impl EditChannel {
///
/// This is for [voice] channels only.
///
- /// [voice]: ../model/enum.ChannelType.html#variant.Voice
+ /// [voice]: ../../model/enum.ChannelType.html#variant.Voice
pub fn bitrate(self, bitrate: u64) -> Self {
EditChannel(self.0.insert("bitrate", bitrate))
}
@@ -54,7 +54,7 @@ impl EditChannel {
///
/// This is for [text] channels only.
///
- /// [text]: ../model/enum.ChannelType.html#variant.Text
+ /// [text]: ../../model/enum.ChannelType.html#variant.Text
pub fn topic(self, topic: &str) -> Self {
EditChannel(self.0.insert("topic", topic))
}
@@ -63,7 +63,7 @@ impl EditChannel {
///
/// This is for [voice] channels only.
///
- /// [voice]: ../model/enum.ChannelType.html#variant.Voice
+ /// [voice]: ../../model/enum.ChannelType.html#variant.Voice
pub fn user_limit(self, user_limit: u64) -> Self {
EditChannel(self.0.insert("user_limit", user_limit))
}
diff --git a/src/utils/builder/edit_profile.rs b/src/utils/builder/edit_profile.rs
index 46dad20..4d25f00 100644
--- a/src/utils/builder/edit_profile.rs
+++ b/src/utils/builder/edit_profile.rs
@@ -32,7 +32,7 @@ impl EditProfile {
/// });
/// ```
///
- /// [`utils::read_image`]: ../utils/fn.read_image.html
+ /// [`utils::read_image`]: ../fn.read_image.html
pub fn avatar(self, icon: Option<&str>) -> Self {
EditProfile(self.0
.insert("avatar",
diff --git a/src/utils/builder/edit_role.rs b/src/utils/builder/edit_role.rs
index cea0c75..3410417 100644
--- a/src/utils/builder/edit_role.rs
+++ b/src/utils/builder/edit_role.rs
@@ -26,15 +26,17 @@ use ::model::{Permissions, Role, permissions};
/// .name("a test role"));
/// ```
///
-/// [`Context::create_role`]: ../client/struct.Context.html#method.create_role
-/// [`Context::edit_role`]: ../client/struct.Context.html#method.edit_role
-/// [`Guild::create_role`]: ../model/struct.Guild.html#method.create_role
-/// [`Role`]: ../model/struct.Role.html
-/// [`Role::edit`]: ../model/struct.Role.html#method.edit
+/// [`Context::create_role`]: ../../client/struct.Context.html#method.create_role
+/// [`Context::edit_role`]: ../../client/struct.Context.html#method.edit_role
+/// [`Guild::create_role`]: ../../model/struct.Guild.html#method.create_role
+/// [`Role`]: ../../model/struct.Role.html
+/// [`Role::edit`]: ../../model/struct.Role.html#method.edit
pub struct EditRole(pub ObjectBuilder);
impl EditRole {
/// Creates a new builder with the values of the given [`Role`].
+ ///
+ /// [`Role`]: ../../model/struct.Role.html
pub fn new(role: &Role) -> Self {
EditRole(ObjectBuilder::new()
.insert("color", role.colour.0)
@@ -91,7 +93,7 @@ impl Default for EditRole {
/// - **permissions**: the [general permissions set]
/// - **position**: 1
///
- /// [general permissions set]: ../model/permissions/fn.general.html
+ /// [general permissions set]: ../../model/permissions/fn.general.html
fn default() -> EditRole {
EditRole(ObjectBuilder::new()
.insert("color", 10070709)
diff --git a/src/utils/builder/execute_webhook.rs b/src/utils/builder/execute_webhook.rs
index 9da701f..073dcb3 100644
--- a/src/utils/builder/execute_webhook.rs
+++ b/src/utils/builder/execute_webhook.rs
@@ -49,9 +49,9 @@ use std::default::Default;
/// .embeds(vec![website, resources]));
/// ```
///
-/// [`Webhook`]: ../model/struct.Webhook.html
+/// [`Webhook`]: ../../model/struct.Webhook.html
/// [`Webhook::execute`]: ../../model/struct.Webhook.html#method.execute
-/// [`execute_webhook`]: ../client/rest/fn.execute_webhook.html
+/// [`execute_webhook`]: ../../client/rest/fn.execute_webhook.html
pub struct ExecuteWebhook(pub ObjectBuilder);
impl ExecuteWebhook {
diff --git a/src/utils/builder/search.rs b/src/utils/builder/search.rs
index c0a7499..f6256d8 100644
--- a/src/utils/builder/search.rs
+++ b/src/utils/builder/search.rs
@@ -240,6 +240,8 @@ impl<'a> Search<'a> {
///
/// The default value is `2`. The minimum value is `0`. The maximum value is
/// `2`.
+ ///
+ /// [`Message`]: ../../model/struct.Message.html
pub fn context_size(mut self, context_size: u8) -> Self {
self.0.insert("context_size", context_size.to_string());
@@ -327,7 +329,7 @@ impl<'a> Search<'a> {
/// The minimum value is `0`. The maximum value is `5000`.
///
/// [`Message`]: ../../model/struct.Message.html
- /// [`limit`]: fn.limit.html
+ /// [`limit`]: #method.limit
pub fn offset(mut self, offset: u16) -> Self {
self.0.insert("offset", offset.to_string());