diff options
| author | Austin Hellyer <[email protected]> | 2016-11-05 16:32:42 -0700 |
|---|---|---|
| committer | Austin Hellyer <[email protected]> | 2016-11-05 16:32:42 -0700 |
| commit | aab12ec36bda78121e1c4de4bc48822bd2b5d8a5 (patch) | |
| tree | 5d58844781983b6c43003838ad7a0fac0f03bdbe | |
| parent | Support major parameters in ratelimits (diff) | |
| download | serenity-aab12ec36bda78121e1c4de4bc48822bd2b5d8a5.tar.xz serenity-aab12ec36bda78121e1c4de4bc48822bd2b5d8a5.zip | |
Fix doc links to enum variants
Most of the docs were linking to `enum.EnumName.html#VariantName.v`,
which should have been linking to
`enum.EnumName.html#variant.VariantName`.
| -rw-r--r-- | src/builder.rs | 6 | ||||
| -rw-r--r-- | src/client/context.rs | 6 | ||||
| -rw-r--r-- | src/client/mod.rs | 96 | ||||
| -rw-r--r-- | src/error.rs | 4 | ||||
| -rw-r--r-- | src/lib.rs | 2 | ||||
| -rw-r--r-- | src/model/channel.rs | 18 | ||||
| -rw-r--r-- | src/model/guild.rs | 24 | ||||
| -rw-r--r-- | src/model/mod.rs | 4 | ||||
| -rw-r--r-- | src/model/permissions.rs | 2 |
9 files changed, 81 insertions, 81 deletions
diff --git a/src/builder.rs b/src/builder.rs index bf228c5..ccaefb9 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -215,7 +215,7 @@ impl EditChannel { /// /// This is for [voice] channels only. /// - /// [voice]: ../model/enum.ChannelType.html#Voice.v + /// [voice]: ../model/enum.ChannelType.html#variant.Voice pub fn bitrate(self, bitrate: u64) -> Self { EditChannel(self.0.insert("bitrate", bitrate)) } @@ -238,7 +238,7 @@ impl EditChannel { /// /// This is for [text] channels only. /// - /// [text]: ../model/enum.ChannelType.html#Text.v + /// [text]: ../model/enum.ChannelType.html#variant.Text pub fn topic(self, topic: &str) -> Self { EditChannel(self.0.insert("topic", topic)) } @@ -247,7 +247,7 @@ impl EditChannel { /// /// This is for [voice] channels only. /// - /// [voice]: ../model/enum.ChannelType.html#Voice.v + /// [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/client/context.rs b/src/client/context.rs index ef314eb..22bcf1d 100644 --- a/src/client/context.rs +++ b/src/client/context.rs @@ -63,7 +63,7 @@ impl Context { /// # Errors /// /// Returns a - /// [ClientError::InvalidOperationAsBot](../enum.ClientError.html#InvalidOperationAsUser.v) + /// [ClientError::InvalidOperationAsBot](../enum.ClientError.html#variant.InvalidOperationAsUser) /// if this is a bot. pub fn ack_message<C, M>(&self, channel_id: C, message_id: M) -> Result<()> where C: Into<ChannelId>, M: Into<MessageId> { @@ -101,7 +101,7 @@ impl Context { /// # Errors /// /// Returns a - /// [ClientError::DeleteMessageDaysAmount](./enum.ClientError.html#DeleteMessageDaysAmount.v) + /// [ClientError::DeleteMessageDaysAmount](./enum.ClientError.html#variant.DeleteMessageDaysAmount) /// if the number of days given is over the maximum allowed. pub fn ban_user<G, U>(&self, guild_id: G, user_id: U, delete_message_days: u8) -> Result<()> where G: Into<GuildId>, U: Into<UserId> { @@ -672,7 +672,7 @@ impl Context { /// # Errors /// /// Returns a - /// [ClientError::InvalidOperationAsUser](../enum.ClientError.html#InvalidOperationAsUser.v) + /// [ClientError::InvalidOperationAsUser](../enum.ClientError.html#variant.InvalidOperationAsUser) /// if this is a user. pub fn get_message<C, M>(&self, channel_id: C, message_id: M) -> Result<Message> where C: Into<ChannelId>, M: Into<MessageId> { diff --git a/src/client/mod.rs b/src/client/mod.rs index 50461c8..f1be140 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -114,7 +114,7 @@ lazy_static! { /// [`Client`]: struct.Client.html /// [`Context`]: struct.Context.html /// [`Context::ban_user`]: struct.Context.html#method.ban_user -/// [`Error::Client`]: ../enum.Error.html#Client.v +/// [`Error::Client`]: ../enum.Error.html#variant.Client #[derive(Clone, Debug, Eq, Hash, PartialEq)] pub enum ClientError { /// When attempting to delete below or above the minimum and maximum allowed @@ -366,7 +366,7 @@ impl Client { /// Attaches a handler for when a [`CallCreate`] is received. /// - /// [`CallCreate`]: ../model/enum.Event.html#CallCreate.v + /// [`CallCreate`]: ../model/enum.Event.html#variant.CallCreate pub fn on_call_create<F>(&mut self, handler: F) where F: Fn(Context, Call) + Send + Sync + 'static { self.event_store.lock() @@ -376,7 +376,7 @@ impl Client { /// Attaches a handler for when a [`CallDelete`] is received. /// - /// [`CallDelete`]: ../model/enum.Event.html#CallDelete.v + /// [`CallDelete`]: ../model/enum.Event.html#variant.CallDelete pub fn on_call_delete<F>(&mut self, handler: F) where F: Fn(Context, Option<Call>) + Send + Sync + 'static { self.event_store.lock() @@ -386,7 +386,7 @@ impl Client { /// Attaches a handler for when a [`CallUpdate`] is received. /// - /// [`CallUpdate`]: ../model/enum.Event.html#CallUpdate.v + /// [`CallUpdate`]: ../model/enum.Event.html#variant.CallUpdate pub fn on_call_update<F>(&mut self, handler: F) where F: Fn(Context, Option<Call>, Option<Call>) + Send + Sync + 'static { self.event_store.lock() @@ -396,7 +396,7 @@ impl Client { /// Attaches a handler for when a [`ChannelCreate`] is received. /// - /// [`ChannelCreate`]: ../model/enum.Event.html#ChannelCreate.v + /// [`ChannelCreate`]: ../model/enum.Event.html#variant.ChannelCreate pub fn on_channel_create<F>(&mut self, handler: F) where F: Fn(Context, Channel) + Send + Sync + 'static { self.event_store.lock() @@ -406,7 +406,7 @@ impl Client { /// Attaches a handler for when a [`ChannelDelete`] is received. /// - /// [`ChannelDelete`]: ../model/enum.Event.html#ChannelDelete.v + /// [`ChannelDelete`]: ../model/enum.Event.html#variant.ChannelDelete pub fn on_channel_delete<F>(&mut self, handler: F) where F: Fn(Context, Channel) + Send + Sync + 'static { self.event_store.lock() @@ -416,7 +416,7 @@ impl Client { /// Attaches a handler for when a [`ChannelPinsAck`] is received. /// - /// [`ChannelPinsAck`]: ../model/enum.Event.html#ChannelPinsAck.v + /// [`ChannelPinsAck`]: ../model/enum.Event.html#variant.ChannelPinsAck pub fn on_channel_pins_ack<F>(&mut self, handler: F) where F: Fn(Context, ChannelPinsAckEvent) + Send + Sync + 'static { self.event_store.lock() @@ -426,7 +426,7 @@ impl Client { /// Attaches a handler for when a [`ChannelPinsUpdate`] is received. /// - /// [`ChannelPinsUpdate`]: ../model/enum.Event.html#ChannelPinsUpdate.v + /// [`ChannelPinsUpdate`]: ../model/enum.Event.html#variant.ChannelPinsUpdate pub fn on_channel_pins_update<F>(&mut self, handler: F) where F: Fn(Context, ChannelPinsUpdateEvent) + Send + Sync + 'static { self.event_store.lock() @@ -436,7 +436,7 @@ impl Client { /// Attaches a handler for when a [`ChannelUpdate`] is received. /// - /// [`ChannelUpdate`]: ../model/enum.Event.html#ChannelUpdate.v + /// [`ChannelUpdate`]: ../model/enum.Event.html#variant.ChannelUpdate pub fn on_channel_update<F>(&mut self, handler: F) where F: Fn(Context, Option<Channel>, Channel) + Send + Sync + 'static { self.event_store.lock() @@ -446,7 +446,7 @@ impl Client { /// Attaches a handler for when a [`GuildCreate`] is received. /// - /// [`GuildCreate`]: ../model/enum.Event.html#GuildCreate.v + /// [`GuildCreate`]: ../model/enum.Event.html#variant.GuildCreate pub fn on_guild_create<F>(&mut self, handler: F) where F: Fn(Context, LiveGuild) + Send + Sync + 'static { self.event_store.lock() @@ -456,7 +456,7 @@ impl Client { /// Attaches a handler for when a [`GuilDelete`] is received. /// - /// [`GuilDelete`]: ../model/enum.Event.html#GuilDelete.v + /// [`GuilDelete`]: ../model/enum.Event.html#variant.GuildDelete pub fn on_guild_delete<F>(&mut self, handler: F) where F: Fn(Context, Guild) + Send + Sync + 'static { self.event_store.lock() @@ -466,7 +466,7 @@ impl Client { /// Attaches a handler for when a [`GuildEmojisUpdate`] is received. /// - /// [`GuildEmojisUpdate`]: ../model/enum.Event.html#GuildEmojisUpdate.v + /// [`GuildEmojisUpdate`]: ../model/enum.Event.html#variant.GuildEmojisUpdate pub fn on_guild_emojis_update<F>(&mut self, handler: F) where F: Fn(Context, GuildEmojisUpdateEvent) + Send + Sync + 'static { self.event_store.lock() @@ -476,7 +476,7 @@ impl Client { /// Attaches a handler for when a [`GuildIntegrationsUpdate`] is received. /// - /// [`GuildIntegrationsUpdate`]: ../model/enum.Event.html#GuildIntegrationsUpdate.v + /// [`GuildIntegrationsUpdate`]: ../model/enum.Event.html#variant.GuildIntegrationsUpdate pub fn on_guild_integrations_update<F>(&mut self, handler: F) where F: Fn(Context, GuildIntegrationsUpdateEvent) + Send + Sync + 'static { self.event_store.lock() @@ -486,7 +486,7 @@ impl Client { /// Attaches a handler for when a [`GuildMemberAdd`] is received. /// - /// [`GuildMemberAdd`]: ../model/enum.Event.html#GuildMemberAdd.v + /// [`GuildMemberAdd`]: ../model/enum.Event.html#variant.GuildMemberAdd pub fn on_guild_member_add<F>(&mut self, handler: F) where F: Fn(Context, GuildId, Member) + Send + Sync + 'static { self.event_store.lock() @@ -496,7 +496,7 @@ impl Client { /// Attaches a handler for when a [`GuildMemberRemove`] is received. /// - /// [`GuildMemberRemove`]: ../model/enum.Event.html#GuildMemberRemove.v + /// [`GuildMemberRemove`]: ../model/enum.Event.html#variant.GuildMemberRemove pub fn on_guild_member_remove<F>(&mut self, handler: F) where F: Fn(Context, GuildId, User) + Send + Sync + 'static { self.event_store.lock() @@ -506,7 +506,7 @@ impl Client { /// Attaches a handler for when a [`GuildMemberUpdate`] is received. /// - /// [`GuildMemberUpdate`]: ../model/enum.Event.html#GuildMemberUpdate.v + /// [`GuildMemberUpdate`]: ../model/enum.Event.html#variant.GuildMemberUpdate pub fn on_guild_member_update<F>(&mut self, handler: F) where F: Fn(Context, Option<Member>, Member) + Send + Sync + 'static { self.event_store.lock() @@ -516,7 +516,7 @@ impl Client { /// Attaches a handler for when a [`GuildMembersChunk`] is received. /// - /// [`GuildMembersChunk`]: ../model/enum.Event.html#GuildMembersChunk.v + /// [`GuildMembersChunk`]: ../model/enum.Event.html#variant.GuildMembersChunk pub fn on_guild_members_chunk<F>(&mut self, handler: F) where F: Fn(Context, GuildId, HashMap<UserId, Member>) + Send + Sync + 'static { self.event_store.lock() @@ -526,7 +526,7 @@ impl Client { /// Attaches a handler for when a [`GuildRoleCreate`] is received. /// - /// [`GuildRoleCreate`]: ../model/enum.Event.html#GuildRoleCreate.v + /// [`GuildRoleCreate`]: ../model/enum.Event.html#variant.GuildRoleCreate pub fn on_guild_role_create<F>(&mut self, handler: F) where F: Fn(Context, GuildId, Role) + Send + Sync + 'static { self.event_store.lock() @@ -536,7 +536,7 @@ impl Client { /// Attaches a handler for when a [`GuildRoleDelete`] is received. /// - /// [`GuildRoleDelete`]: ../model/enum.Event.html#GuildRoleDelete.v + /// [`GuildRoleDelete`]: ../model/enum.Event.html#variant.GuildRoleDelete pub fn on_guild_role_delete<F>(&mut self, handler: F) where F: Fn(Context, GuildId, RoleId) + Send + Sync + 'static { self.event_store.lock() @@ -546,7 +546,7 @@ impl Client { /// Attaches a handler for when a [`GuildRoleUpdate`] is received. /// - /// [`GuildRoleUpdate`]: ../model/enum.Event.html#GuildRoleUpdate.v + /// [`GuildRoleUpdate`]: ../model/enum.Event.html#variant.GuildRoleUpdate pub fn on_guild_role_update<F>(&mut self, handler: F) where F: Fn(Context, GuildId, Role) + Send + Sync + 'static { self.event_store.lock() @@ -556,7 +556,7 @@ impl Client { /// Attaches a handler for when a [`GuildRoleSync`] is received. /// - /// [`GuildRoleSync`]: ../model/enum.Event.html#GuildRoleSync.v + /// [`GuildRoleSync`]: ../model/enum.Event.html#variant.GuildRoleSync pub fn on_guild_sync<F>(&mut self, handler: F) where F: Fn(Context, GuildSyncEvent) + Send + Sync + 'static { self.event_store.lock() @@ -566,7 +566,7 @@ impl Client { /// Attaches a handler for when a [`GuildUnavailable`] is received. /// - /// [`GuildUnavailable`]: ../model/enum.Event.html#GuildUnavailable.v + /// [`GuildUnavailable`]: ../model/enum.Event.html#variant.GuildUnavailable pub fn on_guild_unavailable<F>(&mut self, handler: F) where F: Fn(Context, GuildId) + Send + Sync + 'static { self.event_store.lock() @@ -576,7 +576,7 @@ impl Client { /// Attaches a handler for when a [`GuildUpdate`] is received. /// - /// [`GuildUpdate`]: ../model/enum.Event.html#GuildUpdate.v + /// [`GuildUpdate`]: ../model/enum.Event.html#variant.GuildUpdate pub fn on_guild_update<F>(&mut self, handler: F) where F: Fn(Context, Option<LiveGuild>, Guild) + Send + Sync + 'static { self.event_store.lock() @@ -586,7 +586,7 @@ impl Client { /// Attaches a handler for when a [`GuildBan`] is received. /// - /// [`GuildBan`]: ../model/enum.Event.html#GuildBan.v + /// [`GuildBan`]: ../model/enum.Event.html#variant.GuildBan pub fn on_member_ban<F>(&mut self, handler: F) where F: Fn(Context, GuildId, User) + Send + Sync + 'static { self.event_store.lock() @@ -596,7 +596,7 @@ impl Client { /// Attaches a handler for when a [`GuildUnban`] is received. /// - /// [`GuildUnban`]: ../model/enum.Event.html#GuildUnban.v + /// [`GuildUnban`]: ../model/enum.Event.html#variant.GuildUnban pub fn on_member_unban<F>(&mut self, handler: F) where F: Fn(Context, GuildId, User) + Send + Sync + 'static { self.event_store.lock() @@ -606,7 +606,7 @@ impl Client { /// Attaches a handler for when a [`MessageCreate`] is received. /// - /// [`MessageCreate`]: ../model/enum.Event.html#MessageCreate.v + /// [`MessageCreate`]: ../model/enum.Event.html#variant.MessageCreate pub fn on_message<F>(&mut self, handler: F) where F: Fn(Context, Message) + Send + Sync + 'static { @@ -617,7 +617,7 @@ impl Client { /// Attaches a handler for when a [`MessageAck`] is received. /// - /// [`MessageAck`]: ../model/enum.Event.html#MessageAck.v + /// [`MessageAck`]: ../model/enum.Event.html#variant.MessageAck pub fn on_message_ack<F>(&mut self, handler: F) where F: Fn(Context, ChannelId, Option<MessageId>) + Send + Sync + 'static { self.event_store.lock() @@ -627,7 +627,7 @@ impl Client { /// Attaches a handler for when a [`MessageDelete`] is received. /// - /// [`MessageDelete`]: ../model/enum.Event.html#MessageDelete.v + /// [`MessageDelete`]: ../model/enum.Event.html#variant.MessageDelete pub fn on_message_delete<F>(&mut self, handler: F) where F: Fn(Context, ChannelId, MessageId) + Send + Sync + 'static { self.event_store.lock() @@ -637,7 +637,7 @@ impl Client { /// Attaches a handler for when a [`MessageDeleteBulk`] is received. /// - /// [`MessageDeleteBulk`]: ../model/enum.Event.html#MessageDeleteBulk.v + /// [`MessageDeleteBulk`]: ../model/enum.Event.html#variant.MessageDeleteBulk pub fn on_message_delete_bulk<F>(&mut self, handler: F) where F: Fn(Context, ChannelId, Vec<MessageId>) + Send + Sync + 'static { self.event_store.lock() @@ -647,7 +647,7 @@ impl Client { /// Attaches a handler for when a [`MessageUpdate`] is received. /// - /// [`MessageUpdate`]: ../model/enum.Event.html#MessageUpdate.v + /// [`MessageUpdate`]: ../model/enum.Event.html#variant.MessageUpdate pub fn on_message_update<F>(&mut self, handler: F) where F: Fn(Context, MessageUpdateEvent) + Send + Sync + 'static { self.event_store.lock() @@ -657,7 +657,7 @@ impl Client { /// Attaches a handler for when a [`UserNoteUpdate`] is received. /// - /// [`UserNoteUpdate`]: ../model/enum.Event.html#UserNoteUpdate.v + /// [`UserNoteUpdate`]: ../model/enum.Event.html#variant.UserNoteUpdate pub fn on_note_update<F>(&mut self, handler: F) where F: Fn(Context, UserId, String) + Send + Sync + 'static { self.event_store.lock() @@ -667,7 +667,7 @@ impl Client { /// Attaches a handler for when a [`PresencesReplace`] is received. /// - /// [`PresencesReplace`]: ../model/enum.Event.html#PresencesReplace.v + /// [`PresencesReplace`]: ../model/enum.Event.html#variant.PresencesReplace pub fn on_presence_replace<F>(&mut self, handler: F) where F: Fn(Context, Vec<Presence>) + Send + Sync + 'static { self.event_store.lock() @@ -677,7 +677,7 @@ impl Client { /// Attaches a handler for when a [`PresenceUpdate`] is received. /// - /// [`PresenceUpdate`]: ../model/enum.Event.html#PresenceUpdate.v + /// [`PresenceUpdate`]: ../model/enum.Event.html#variant.PresenceUpdate pub fn on_presence_update<F>(&mut self, handler: F) where F: Fn(Context, PresenceUpdateEvent) + Send + Sync + 'static { self.event_store.lock() @@ -687,7 +687,7 @@ impl Client { /// Attached a handler for when a [`ReactionAdd`] is received. /// - /// [`ReactionAdd`]: ../model/enum.Event.html#ReactionAdd.v + /// [`ReactionAdd`]: ../model/enum.Event.html#variant.ReactionAdd pub fn on_reaction_add<F>(&mut self, handler: F) where F: Fn(Context, Reaction) + Send + Sync + 'static { self.event_store.lock() @@ -697,7 +697,7 @@ impl Client { /// Attached a handler for when a [`ReactionRemove`] is received. /// - /// [`ReactionRemove`]: ../model/enum.Event.html#ReactionRemove.v + /// [`ReactionRemove`]: ../model/enum.Event.html#variant.ReactionRemove pub fn on_reaction_remove<F>(&mut self, handler: F) where F: Fn(Context, Reaction) + Send + Sync + 'static { self.event_store.lock() @@ -734,7 +734,7 @@ impl Client { /// Attaches a handler for when a [`ChannelRecipientAdd`] is received. /// - /// [`ChannelRecipientAdd`]: ../model/enum.Event.html#ChannelRecipientAdd.v + /// [`ChannelRecipientAdd`]: ../model/enum.Event.html#variant.ChannelRecipientAdd pub fn on_recipient_add<F>(&mut self, handler: F) where F: Fn(Context, ChannelId, User) + Send + Sync + 'static { self.event_store.lock() @@ -744,7 +744,7 @@ impl Client { /// Attaches a handler for when a [`ChannelRecipientRemove`] is received. /// - /// [`ChannelRecipientRemove`]: ../model/enum.Event.html#ChannelRecipientRemove.v + /// [`ChannelRecipientRemove`]: ../model/enum.Event.html#variant.ChannelRecipientRemove pub fn on_recipient_remove<F>(&mut self, handler: F) where F: Fn(Context, ChannelId, User) + Send + Sync + 'static { self.event_store.lock() @@ -754,7 +754,7 @@ impl Client { /// Attaches a handler for when a [`RelationshipAdd`] is received. /// - /// [`RelationshipAdd`]: ../model/enum.Event.html#RelationshipAdd.v + /// [`RelationshipAdd`]: ../model/enum.Event.html#variant.RelationshipAdd pub fn on_relationship_add<F>(&mut self, handler: F) where F: Fn(Context, Relationship) + Send + Sync + 'static { self.event_store.lock() @@ -764,7 +764,7 @@ impl Client { /// Attaches a handler for when a [`RelationshipRemove`] is received. /// - /// [`RelationshipRemove`]: ../model/enum.Event.html#RelationshipRemove.v + /// [`RelationshipRemove`]: ../model/enum.Event.html#variant.RelationshipRemove pub fn on_relationship_remove<F>(&mut self, handler: F) where F: Fn(Context, UserId, RelationshipType) + Send + Sync + 'static { self.event_store.lock() @@ -774,7 +774,7 @@ impl Client { /// Attaches a handler for when a [`Resumed`] is received. /// - /// [`Resumed`]: ../model/enum.Event.html#Resumed.v + /// [`Resumed`]: ../model/enum.Event.html#variant.Resumed pub fn on_resume<F>(&mut self, handler: F) where F: Fn(Context, ResumedEvent) + Send + Sync + 'static { self.event_store.lock() @@ -784,7 +784,7 @@ impl Client { /// Attaches a handler for when a [`TypingStart`] is received. /// - /// [`TypingStart`]: ../model/enum.Event.html#TypingStart.v + /// [`TypingStart`]: ../model/enum.Event.html#variant.TypingStart pub fn on_typing_start<F>(&mut self, handler: F) where F: Fn(Context, TypingStartEvent) + Send + Sync + 'static { self.event_store.lock() @@ -794,7 +794,7 @@ impl Client { /// Attaches a handler for when an [`Unknown`] is received. /// - /// [`Unknown`]: ../model/enum.Event.html#Unknown.v + /// [`Unknown`]: ../model/enum.Event.html#variant.Unknown pub fn on_unknown<F>(&mut self, handler: F) where F: Fn(Context, String, BTreeMap<String, Value>) + Send + Sync + 'static { self.event_store.lock() @@ -804,7 +804,7 @@ impl Client { /// Attaches a handler for when a [`UserGuildSettingsUpdate`] is received. /// - /// [`UserGuildSettingsUpdate`]: ../model/enum.Event.html#UserGuildSettingsUpdate.v + /// [`UserGuildSettingsUpdate`]: ../model/enum.Event.html#variant.UserGuildSettingsUpdate pub fn on_user_guild_settings_update<F>(&mut self, handler: F) where F: Fn(Context, Option<UserGuildSettings>, UserGuildSettings) + Send + Sync + 'static { self.event_store.lock() @@ -814,7 +814,7 @@ impl Client { /// Attaches a handler for when a [`UserUpdate`] is received. /// - /// [`UserUpdate`]: ../model/enum.Event.html#UserUpdate.v + /// [`UserUpdate`]: ../model/enum.Event.html#variant.UserUpdate pub fn on_user_update<F>(&mut self, handler: F) where F: Fn(Context, CurrentUser, CurrentUser) + Send + Sync + 'static { self.event_store.lock() @@ -824,7 +824,7 @@ impl Client { /// Attaches a handler for when a [`UserSettingsUpdate`] is received. /// - /// [`UserSettingsUpdate`]: ../model/enum.Event.html#UserSettingsUpdate.v + /// [`UserSettingsUpdate`]: ../model/enum.Event.html#variant.UserSettingsUpdate pub fn on_user_settings_update<F>(&mut self, handler: F) where F: Fn(Context, UserSettings, UserSettings) + Send + Sync + 'static { self.event_store.lock() @@ -834,7 +834,7 @@ impl Client { /// Attaches a handler for when a [`VoiceStateUpdate`] is received. /// - /// [`VoiceStateUpdate`]: ../model/enum.Event.html#VoiceStateUpdate.v + /// [`VoiceStateUpdate`]: ../model/enum.Event.html#variant.VoiceStateUpdate pub fn on_voice_state_update<F>(&mut self, handler: F) where F: Fn(Context, VoiceStateUpdateEvent) + Send + Sync + 'static { self.event_store.lock() @@ -844,7 +844,7 @@ impl Client { /// Attaches a handler for when a [`VoiceServerUpdate`] is received. /// - /// [`VoiceServerUpdate`]: ../model/enum.Event.html#VoiceServerUpdate.v + /// [`VoiceServerUpdate`]: ../model/enum.Event.html#variant.VoiceServerUpdate pub fn on_voice_server_update<F>(&mut self, handler: F) where F: Fn(Context, VoiceServerUpdateEvent) + Send + Sync + 'static { self.event_store.lock() @@ -965,7 +965,7 @@ fn login(token: &str, login_type: LoginType) -> Client { /// # Errors /// /// Returns a -/// [ClientError::InvalidToken](enum.ClientError.html#InvalidToken.v) when one +/// [ClientError::InvalidToken](enum.ClientError.html#variant.InvalidToken) when one /// of the above checks fail. The type of failure is not specified. pub fn validate_token(token: &str) -> Result<()> { if token.is_empty() { diff --git a/src/error.rs b/src/error.rs index 065958b..2e3ea07 100644 --- a/src/error.rs +++ b/src/error.rs @@ -17,9 +17,9 @@ pub type Result<T> = ::std::result::Result<T, Error>; /// enums, are both wrapped around this in the form of the [`Client`] and /// [`Connection`] variants. /// -/// [`Client`]: #Client.v +/// [`Client`]: #variant.Client /// [`ClientError`]: client/enum.ClientError.html -/// [`Connection`]: #Connection.v +/// [`Connection`]: #variant.Connection /// [`ConnectionError`]: client/enum.ConnectionError.html /// [`Result`]: type.Result.html #[derive(Debug)] @@ -64,7 +64,7 @@ //! [`Connection`]: client/struct.Connection.html //! [`Context`]: client/struct.Context.html //! [`Event`]: model/enum.Event.html -//! [`Event::MessageCreate`]: model/enum.Event.html#MessageCreate.v +//! [`Event::MessageCreate`]: model/enum.Event.html#variant.MessageCreate //! [`State`]: ext/state/struct.State.html //! [client's module-level documentation]: client/index.html //! [docs]: https://discordapp.com/developers/docs/intro diff --git a/src/model/channel.rs b/src/model/channel.rs index fa26bc5..4fa08b9 100644 --- a/src/model/channel.rs +++ b/src/model/channel.rs @@ -142,7 +142,7 @@ impl Group { /// [`ClientError::DeleteMessageDaysAmount`] if the number of messages to /// delete is not within the valid range. /// - /// [`ClientError::DeleteMessageDaysAmount`]: ../client/enum.ClientError.html#DeleteMessageDaysAmount.v + /// [`ClientError::DeleteMessageDaysAmount`]: ../client/enum.ClientError.html#variant.DeleteMessageDaysAmount /// [`Context::delete_messages`]: ../client/struct.Context.html#delete_messages pub fn delete_messages(&self, message_ids: &[MessageId]) -> Result<()> { if message_ids.len() < 2 || message_ids.len() > 100 { @@ -248,8 +248,8 @@ impl Message { /// Returns a [`ClientError::InvalidPermissions`] if the current user does /// not have the required permissions. /// - /// [`ClientError::InvalidPermissions]: ../client/enum.ClientError.html#InvalidPermissions.v - /// [`ClientError::InvalidUser]: ../client/enum.ClientError.html#InvalidUser.v + /// [`ClientError::InvalidPermissions]: ../client/enum.ClientError.html#variant.InvalidPermissions + /// [`ClientError::InvalidUser]: ../client/enum.ClientError.html#variant.InvalidUser /// [Manage Messages]: permissions/constant.MANAGE_MESSAGES.html pub fn delete(&self) -> Result<()> { let req = permissions::MANAGE_MESSAGES; @@ -275,7 +275,7 @@ impl Message { /// Returns a /// [`ClientError::InvalidUser`] if the current user is not the author. /// - /// [`ClientError::InvalidUser`]: ../client/enum.ClientError.html#InvalidUser.v + /// [`ClientError::InvalidUser`]: ../client/enum.ClientError.html#variant.InvalidUser pub fn edit(&mut self, new_content: &str) -> Result<()> { if self.author.id != STATE.lock().unwrap().user.id { return Err(Error::Client(ClientError::InvalidUser)); @@ -305,7 +305,7 @@ impl Message { /// [`ClientError::InvalidPermissions`] if the current user does not have /// the required permissions. /// - /// [`ClientError::InvalidPermissions`]: ../client/enum.ClientError.html#InvalidPermissions.v + /// [`ClientError::InvalidPermissions`]: ../client/enum.ClientError.html#variant.InvalidPermissions /// [Manage Messages]: permissions/constant.MANAGE_MESSAGES.html pub fn pin(&self) -> Result<()> { let req = permissions::MANAGE_MESSAGES; @@ -355,7 +355,7 @@ impl Message { /// [`ClientError::InvalidPermissions`] if the current user does not have /// the required permissions. /// - /// [`ClientError::InvalidPermissions`]: ../client/enum.ClientError.html#InvalidPermissions.v + /// [`ClientError::InvalidPermissions`]: ../client/enum.ClientError.html#variant.InvalidPermissions /// [Send Messages]: permissions/constant.SEND_MESSAGES.html pub fn reply(&self, content: &str) -> Result<Message> { let req = permissions::SEND_MESSAGES; @@ -388,7 +388,7 @@ impl Message { /// [`ClientError::InvalidPermissions`] if the current user does not have /// the required permissions. /// - /// [`ClientError::InvalidPermissions`]: ../client/enum.ClientError.html#InvalidPermissions.v + /// [`ClientError::InvalidPermissions`]: ../client/enum.ClientError.html#variant.InvalidPermissions /// [Manage Messages]: permissions/constant.MANAGE_MESSAGES.html pub fn unpin(&self) -> Result<()> { let req = permissions::MANAGE_MESSAGES; @@ -452,7 +452,7 @@ impl PrivateChannel { /// Returns a /// [`ClientError::InvalidUser`] if the current user is not a bot user. /// - /// [`ClientError::InvalidUser`]: ../client/enum.ClientError.html#InvalidOperationAsUser.v + /// [`ClientError::InvalidUser`]: ../client/enum.ClientError.html#variant.InvalidOperationAsUser pub fn delete_messages(&self, message_ids: &[MessageId]) -> Result<()> { if !STATE.lock().unwrap().user.bot { return Err(Error::Client(ClientError::InvalidOperationAsUser)); @@ -514,7 +514,7 @@ impl PublicChannel { /// [ClientError::InvalidPermissions] if the current user does not have the /// required permissions. /// - /// [`ClientError::InvalidPermissions`]: ../client/enum.ClientError.html#InvalidPermissions.v + /// [`ClientError::InvalidPermissions`]: ../client/enum.ClientError.html#variant.InvalidPermissions /// [Send Messages]: permissions/constants.SEND_MESSAGES.html pub fn broadcast_typing(&self) -> Result<()> { http::broadcast_typing(self.id.0) diff --git a/src/model/guild.rs b/src/model/guild.rs index 1e4fea8..322233f 100644 --- a/src/model/guild.rs +++ b/src/model/guild.rs @@ -164,8 +164,8 @@ impl LiveGuild { /// Returns a [`ClientError::DeleteMessageDaysAmount`] if the number of /// days' worth of messages to delete is over the maximum. /// - /// [`ClientError::DeleteMessageDaysAmount`]: ../client/enum.ClientError.html#DeleteMessageDaysAmount.v - /// [`ClientError::InvalidPermissions`]: ../client/enum.ClientError.html#InvalidPermissions.v + /// [`ClientError::DeleteMessageDaysAmount`]: ../client/enum.ClientError.html#variant.DeleteMessageDaysAmount + /// [`ClientError::InvalidPermissions`]: ../client/enum.ClientError.html#variant.InvalidPermissions /// [`User`]: struct.User.html /// [Ban Members]: permissions/constant.BAN_MEMBERS.html pub fn ban<U: Into<UserId>>(&self, user: U, delete_message_days: u8) @@ -193,7 +193,7 @@ impl LiveGuild { /// not have permission to perform bans. /// /// [`Ban`]: struct.Ban.html - /// [`ClientError::InvalidPermissions`]: ../client/enum.ClientError.html#InvalidPermissions.v + /// [`ClientError::InvalidPermissions`]: ../client/enum.ClientError.html#variant.InvalidPermissions /// [Ban Members]: permissions/constant.BAN_MEMBERS.html pub fn bans(&self) -> Result<Vec<Ban>> { let req = permissions::BAN_MEMBERS; @@ -223,7 +223,7 @@ impl LiveGuild { /// not have permission to perform bans. /// /// [`Channel`]: struct.Channel.html - /// [`ClientError::InvalidPermissions`]: ../client/enum.ClientError.html#InvalidPermissions.v + /// [`ClientError::InvalidPermissions`]: ../client/enum.ClientError.html#variant.InvalidPermissions /// [Manage Channels]: permissions/constants.MANAGE_CHANNELS.html pub fn create_channel(&mut self, name: &str, kind: ChannelType) -> Result<Channel> { @@ -254,7 +254,7 @@ impl LiveGuild { /// Returns a [`ClientError::InvalidPermissions`] if the current user does /// not have permission to perform bans. /// - /// [`ClientError::InvalidPermissions`]: ../client/enum.ClientError.html#InvalidPermissions.v + /// [`ClientError::InvalidPermissions`]: ../client/enum.ClientError.html#variant.InvalidPermissions /// [`Context::create_role`]: ../client/struct.Context.html#method.create_role /// [`Role`]: struct.Role.html /// [Manage Roles]: permissions/constants.MANAGE_ROLES.html @@ -329,7 +329,7 @@ impl LiveGuild { /// Returns a [`ClientError::InvalidUser`] if the current user is not the /// guild owner. /// - /// [`ClientError::InvalidUser`]: ../client/enum.ClientError.html#InvalidUser.v + /// [`ClientError::InvalidUser`]: ../client/enum.ClientError.html#variant.InvalidUser pub fn delete(&self) -> Result<Guild> { if self.owner_id != STATE.lock().unwrap().user.id { let req = permissions::MANAGE_GUILD; @@ -351,7 +351,7 @@ impl LiveGuild { /// Returns a [`ClientError::InvalidPermissions`] if the current user does /// not have permission to perform bans. /// - /// [`ClientError::InvalidPermissions`]: ../client/enum.ClientError.html#InvalidPermissions.v + /// [`ClientError::InvalidPermissions`]: ../client/enum.ClientError.html#variant.InvalidPermissions /// [`Context::edit_guild`]: ../client/struct.Context.html#method.edit_guild /// [Manage Guild]: permissions/constants.MANAGE_GUILD.html pub fn edit<F>(&mut self, f: F) -> Result<()> @@ -403,7 +403,7 @@ impl LiveGuild { /// Returns a [`ClientError::InvalidPermissions`] if the current user does /// not have permission to perform bans. /// - /// [`ClientError::InvalidPermissions`]: ../client/enum.ClientError.html#InvalidPermissions.v + /// [`ClientError::InvalidPermissions`]: ../client/enum.ClientError.html#variant.InvalidPermissions /// [Manage Guild]: permissions/constant.MANAGE_GUILD.html pub fn get_invites(&self) -> Result<Vec<RichInvite>> { let req = permissions::MANAGE_GUILD; @@ -606,7 +606,7 @@ impl LiveGuild { /// Returns a [`ClientError::InvalidPermissions`] if the current user does /// not have permission to perform bans. /// - /// [`ClientError::InvalidPermissions`]: ../client/enum.ClientError.html#InvalidPermissions.v + /// [`ClientError::InvalidPermissions`]: ../client/enum.ClientError.html#variant.InvalidPermissions /// [`GuildPrune`]: struct.GuildPrune.html /// [`Member`]: struct.Member.html /// [Kick Members]: permissions/constant.KICK_MEMBERS.html @@ -635,7 +635,7 @@ impl LiveGuild { /// Returns a [`ClientError::InvalidPermissions`] if the current user does /// not have permission to perform bans. /// - /// [`ClientError::InvalidPermissions`]: ../client/enum.ClientError.html#InvalidPermissions.v + /// [`ClientError::InvalidPermissions`]: ../client/enum.ClientError.html#variant.InvalidPermissions /// [`GuildPrune`]: struct.GuildPrune.html /// [`Member`]: struct.Member.html /// [Kick Members]: permissions/constant.KICK_MEMBERS.html @@ -662,7 +662,7 @@ impl LiveGuild { /// Returns a [`ClientError::InvalidPermissions`] if the current user does /// not have permission to perform bans. /// - /// [`ClientError::InvalidPermissions`]: ../client/enum.ClientError.html#InvalidPermissions.v + /// [`ClientError::InvalidPermissions`]: ../client/enum.ClientError.html#variant.InvalidPermissions /// [`User`]: struct.User.html /// [Ban Members]: permissions/constant.BAN_MEMBERS.html pub fn unban<U: Into<UserId>>(&self, user: U) -> Result<()> { @@ -889,7 +889,7 @@ impl Role { /// Returns a [`ClientError::GuildNotFound`] if a guild is not in the state /// that contains the role. /// - /// [`ClientError::GuildNotFound`]: ../client/enum.ClientError.html#GuildNotFound.v + /// [`ClientError::GuildNotFound`]: ../client/enum.ClientError.html#variant.GuildNotFound pub fn find_guild(&self) -> Result<GuildId> { STATE.lock() .unwrap() diff --git a/src/model/mod.rs b/src/model/mod.rs index 8478cc2..2212747 100644 --- a/src/model/mod.rs +++ b/src/model/mod.rs @@ -100,8 +100,8 @@ pub enum Channel { /// A [text] or [voice] channel within a [`Guild`]. /// /// [`Guild`]: struct.Guild.html - /// [text]: enum.ChannelType.html#Text.v - /// [voice]: enum.ChannelType.html#Voice.v + /// [text]: enum.ChannelType.html#variant.Text + /// [voice]: enum.ChannelType.html#variant.Voice Public(PublicChannel), } diff --git a/src/model/permissions.rs b/src/model/permissions.rs index 3bcf219..b14ab82 100644 --- a/src/model/permissions.rs +++ b/src/model/permissions.rs @@ -224,7 +224,7 @@ bitflags! { /// If this is disabled, then [`Member`]s must use push-to-talk. /// /// [`Member`]: ../struct.Member.html - /// [voice]: ../enum.ChannelType.html#Voice.v + /// [voice]: ../enum.ChannelType.html#variant.Voice const USE_VAD = 1 << 25, /// Allows members to change their own nickname in the guild. const CHANGE_NICKNAME = 1 << 26, |