114 lines
64 KiB
HTML
114 lines
64 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `Discord` struct in crate `discord_sdk`."><meta name="keywords" content="rust, rustlang, rust-lang, Discord"><title>Discord in discord_sdk - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../dark.css" disabled><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../storage.js"></script><script src="../crates.js"></script><script defer src="../main.js"></script>
|
||
<noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a class="sidebar-logo" href="../discord_sdk/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.png" alt="logo"></div>
|
||
</a><h2 class="location">Struct Discord</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.accept_invite">accept_invite</a><a href="#method.clear_activity">clear_activity</a><a href="#method.connect_lobby">connect_lobby</a><a href="#method.connect_lobby_voice">connect_lobby_voice</a><a href="#method.create_lobby">create_lobby</a><a href="#method.delete_lobby">delete_lobby</a><a href="#method.disconnect">disconnect</a><a href="#method.disconnect_lobby">disconnect_lobby</a><a href="#method.disconnect_lobby_voice">disconnect_lobby_voice</a><a href="#method.get_relationships">get_relationships</a><a href="#method.invite_user">invite_user</a><a href="#method.new">new</a><a href="#method.open_activity_invite">open_activity_invite</a><a href="#method.open_guild_invite">open_guild_invite</a><a href="#method.open_voice_settings">open_voice_settings</a><a href="#method.search_lobbies">search_lobbies</a><a href="#method.send_join_request_reply">send_join_request_reply</a><a href="#method.send_lobby_message">send_lobby_message</a><a href="#method.set_overlay_visibility">set_overlay_visibility</a><a href="#method.update_activity">update_activity</a><a href="#method.update_lobby">update_lobby</a><a href="#method.update_lobby_member">update_lobby_member</a><a href="#method.update_voice_settings">update_voice_settings</a><a href="#method.voice_mute_user">voice_mute_user</a><a href="#method.voice_set_input_mode">voice_set_input_mode</a><a href="#method.voice_set_user_volume">voice_set_user_volume</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">!RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">!UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-WithSubscriber">WithSubscriber</a></div></div><h2 class="location">Other items in<br><a href="index.html">discord_sdk</a></h2><div id="sidebar-vars" data-name="Discord" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../discord_sdk/index.html"><img class="rust-logo" src="../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="index.html">discord_sdk</a>::<wbr><a class="struct" href="#">Discord</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/discord_sdk/lib.rs.html#146-155" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust struct"><code>pub struct Discord { /* fields omitted */ }</code></pre></div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/discord_sdk/activity.rs.html#551-691" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.Discord.html" title="struct discord_sdk::Discord">Discord</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.update_activity" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/discord_sdk/activity.rs.html#559-570" title="goto source code">[src]</a></div><a href="#method.update_activity" class="anchor"></a><h4 class="code-header">pub async fn <a href="#method.update_activity" class="fnname">update_activity</a>(<br> &self, <br> activity: impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="activity/struct.ActivityArgs.html" title="struct discord_sdk::activity::ActivityArgs">ActivityArgs</a>><br>) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="activity/struct.Activity.html" title="struct discord_sdk::activity::Activity">Activity</a>>, <a class="enum" href="error/enum.Error.html" title="enum discord_sdk::error::Error">Error</a>></h4></div></summary><div class="docblock"><p>Sets the current <a href="user/struct.User.html"><code>User's</code></a> presence in Discord to a
|
||
new activity.</p>
|
||
<h5 id="errors" class="section-header"><a href="#errors">Errors</a></h5>
|
||
<p>This has a rate limit of 5 updates per 20 seconds.</p>
|
||
<p><a href="https://discord.com/developers/docs/game-sdk/activities#updateactivity">API docs</a></p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.invite_user" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/discord_sdk/activity.rs.html#581-609" title="goto source code">[src]</a></div><a href="#method.invite_user" class="anchor"></a><h4 class="code-header">pub async fn <a href="#method.invite_user" class="fnname">invite_user</a>(<br> &self, <br> user_id: <a class="type" href="user/type.UserId.html" title="type discord_sdk::user::UserId">UserId</a>, <br> message: impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>, <br> kind: <a class="enum" href="activity/enum.ActivityActionKind.html" title="enum discord_sdk::activity::ActivityActionKind">ActivityActionKind</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.unit.html">()</a>, <a class="enum" href="error/enum.Error.html" title="enum discord_sdk::error::Error">Error</a>></h4></div></summary><div class="docblock"><p>Invites the specified <a href="user/struct.User.html"><code>User</code></a> to join the current
|
||
user’s game.</p>
|
||
<h5 id="errors-1" class="section-header"><a href="#errors-1">Errors</a></h5>
|
||
<p>The current <a href="user/struct.User.html"><code>User</code></a> must have their presence updated
|
||
with all of the <a href="https://discord.com/developers/docs/game-sdk/activities#activity-action-field-requirements">required fields</a>
|
||
otherwise this call will fail.</p>
|
||
<p><a href="https://discord.com/developers/docs/game-sdk/activities#sendinvite">API docs</a></p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.accept_invite" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/discord_sdk/activity.rs.html#614-641" title="goto source code">[src]</a></div><a href="#method.accept_invite" class="anchor"></a><h4 class="code-header">pub async fn <a href="#method.accept_invite" class="fnname">accept_invite</a>(<br> &self, <br> invite: &impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="struct" href="activity/struct.ActivityInvite.html" title="struct discord_sdk::activity::ActivityInvite">ActivityInvite</a>><br>) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.unit.html">()</a>, <a class="enum" href="error/enum.Error.html" title="enum discord_sdk::error::Error">Error</a>></h4></div></summary><div class="docblock"><p>Accepts the invite to another user’s activity.</p>
|
||
<p><a href="https://discord.com/developers/docs/game-sdk/activities#acceptinvite">API docs</a></p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clear_activity" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/discord_sdk/activity.rs.html#646-652" title="goto source code">[src]</a></div><a href="#method.clear_activity" class="anchor"></a><h4 class="code-header">pub async fn <a href="#method.clear_activity" class="fnname">clear_activity</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="activity/struct.Activity.html" title="struct discord_sdk::activity::Activity">Activity</a>>, <a class="enum" href="error/enum.Error.html" title="enum discord_sdk::error::Error">Error</a>></h4></div></summary><div class="docblock"><p>Clears the rich presence for the logged in <a href="user/struct.User.html"><code>User</code></a>.</p>
|
||
<p><a href="https://discord.com/developers/docs/game-sdk/activities#clearactivity">API docs</a></p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.send_join_request_reply" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/discord_sdk/activity.rs.html#657-690" title="goto source code">[src]</a></div><a href="#method.send_join_request_reply" class="anchor"></a><h4 class="code-header">pub async fn <a href="#method.send_join_request_reply" class="fnname">send_join_request_reply</a>(<br> &self, <br> user_id: <a class="type" href="user/type.UserId.html" title="type discord_sdk::user::UserId">UserId</a>, <br> reply: impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="activity/enum.JoinRequestReply.html" title="enum discord_sdk::activity::JoinRequestReply">JoinRequestReply</a>><br>) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.unit.html">()</a>, <a class="enum" href="error/enum.Error.html" title="enum discord_sdk::error::Error">Error</a>></h4></div></summary><div class="docblock"><p>Sends a reply to an <a href="enum.Event.html#variant.ActivityJoinRequest">Ask to Join</a> request.</p>
|
||
<p><a href="https://discord.com/developers/docs/game-sdk/activities#sendrequestreply">API docs</a></p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-1" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/discord_sdk/lobby/search.rs.html#205-216" title="goto source code">[src]</a></div><a href="#impl-1" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.Discord.html" title="struct discord_sdk::Discord">Discord</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.search_lobbies" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/discord_sdk/lobby/search.rs.html#209-215" title="goto source code">[src]</a></div><a href="#method.search_lobbies" class="anchor"></a><h4 class="code-header">pub async fn <a href="#method.search_lobbies" class="fnname">search_lobbies</a>(<br> &self, <br> query: <a class="struct" href="lobby/search/struct.SearchQuery.html" title="struct discord_sdk::lobby::search::SearchQuery">SearchQuery</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="lobby/struct.Lobby.html" title="struct discord_sdk::lobby::Lobby">Lobby</a>>, <a class="enum" href="error/enum.Error.html" title="enum discord_sdk::error::Error">Error</a>></h4></div></summary><div class="docblock"><p>Searches available lobbies based on the search criteria</p>
|
||
<p><a href="https://discord.com/developers/docs/game-sdk/lobbies#search">API docs</a></p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-2" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/discord_sdk/lobby.rs.html#345-500" title="goto source code">[src]</a></div><a href="#impl-2" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.Discord.html" title="struct discord_sdk::Discord">Discord</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.create_lobby" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/discord_sdk/lobby.rs.html#350-356" title="goto source code">[src]</a></div><a href="#method.create_lobby" class="anchor"></a><h4 class="code-header">pub async fn <a href="#method.create_lobby" class="fnname">create_lobby</a>(<br> &self, <br> args: <a class="struct" href="lobby/struct.CreateLobbyBuilder.html" title="struct discord_sdk::lobby::CreateLobbyBuilder">CreateLobbyBuilder</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="lobby/struct.Lobby.html" title="struct discord_sdk::lobby::Lobby">Lobby</a>, <a class="enum" href="error/enum.Error.html" title="enum discord_sdk::error::Error">Error</a>></h4></div></summary><div class="docblock"><p>Creates a new <a href="lobby/struct.Lobby.html" title="Lobby"><code>Lobby</code></a>, automatically joining the current
|
||
<a href="user/struct.User.html"><code>User</code></a> and making them the owner of the <a href="lobby/struct.Lobby.html" title="Lobby"><code>Lobby</code></a>.</p>
|
||
<p><a href="https://discord.com/developers/docs/game-sdk/lobbies#createlobby">API docs</a></p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.update_lobby" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/discord_sdk/lobby.rs.html#367-378" title="goto source code">[src]</a></div><a href="#method.update_lobby" class="anchor"></a><h4 class="code-header">pub async fn <a href="#method.update_lobby" class="fnname">update_lobby</a>(<br> &self, <br> args: <a class="struct" href="lobby/struct.UpdateLobbyBuilder.html" title="struct discord_sdk::lobby::UpdateLobbyBuilder">UpdateLobbyBuilder</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="lobby/struct.LobbyArgs.html" title="struct discord_sdk::lobby::LobbyArgs">LobbyArgs</a>, <a class="enum" href="error/enum.Error.html" title="enum discord_sdk::error::Error">Error</a>></h4></div></summary><div class="docblock"><p>Updates a lobby.</p>
|
||
<h5 id="errors-2" class="section-header"><a href="#errors-2">Errors</a></h5>
|
||
<p>This call has a rate limit of 10 updates per 5 seconds. If you fear you
|
||
might hit that, it may be a good idea to batch your lobby updates into
|
||
transactions.</p>
|
||
<p><a href="https://discord.com/developers/docs/game-sdk/lobbies#updatelobby">API docs</a></p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.delete_lobby" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/discord_sdk/lobby.rs.html#383-389" title="goto source code">[src]</a></div><a href="#method.delete_lobby" class="anchor"></a><h4 class="code-header">pub async fn <a href="#method.delete_lobby" class="fnname">delete_lobby</a>(&self, id: <a class="type" href="lobby/type.LobbyId.html" title="type discord_sdk::lobby::LobbyId">LobbyId</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.unit.html">()</a>, <a class="enum" href="error/enum.Error.html" title="enum discord_sdk::error::Error">Error</a>></h4></div></summary><div class="docblock"><p>Deletes the specified lobby.</p>
|
||
<p><a href="https://discord.com/developers/docs/game-sdk/lobbies#deletelobby">API docs</a></p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.connect_lobby" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/discord_sdk/lobby.rs.html#395-401" title="goto source code">[src]</a></div><a href="#method.connect_lobby" class="anchor"></a><h4 class="code-header">pub async fn <a href="#method.connect_lobby" class="fnname">connect_lobby</a>(&self, lobby: <a class="struct" href="lobby/struct.ConnectLobby.html" title="struct discord_sdk::lobby::ConnectLobby">ConnectLobby</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="lobby/struct.Lobby.html" title="struct discord_sdk::lobby::Lobby">Lobby</a>, <a class="enum" href="error/enum.Error.html" title="enum discord_sdk::error::Error">Error</a>></h4></div></summary><div class="docblock"><p>Connects to the specified lobby, which comprises 2 pieces of information,
|
||
the lobby identifier, and the lobby secret.</p>
|
||
<p><a href="https://discord.com/developers/docs/game-sdk/lobbies#connectlobby">API docs</a></p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.disconnect_lobby" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/discord_sdk/lobby.rs.html#406-412" title="goto source code">[src]</a></div><a href="#method.disconnect_lobby" class="anchor"></a><h4 class="code-header">pub async fn <a href="#method.disconnect_lobby" class="fnname">disconnect_lobby</a>(&self, id: <a class="type" href="lobby/type.LobbyId.html" title="type discord_sdk::lobby::LobbyId">LobbyId</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.unit.html">()</a>, <a class="enum" href="error/enum.Error.html" title="enum discord_sdk::error::Error">Error</a>></h4></div></summary><div class="docblock"><p>Disconnects the current user from a lobby.</p>
|
||
<p><a href="https://discord.com/developers/docs/game-sdk/lobbies#disconnectlobby">API docs</a></p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.send_lobby_message" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/discord_sdk/lobby.rs.html#422-438" title="goto source code">[src]</a></div><a href="#method.send_lobby_message" class="anchor"></a><h4 class="code-header">pub async fn <a href="#method.send_lobby_message" class="fnname">send_lobby_message</a>(<br> &self, <br> lobby_id: <a class="type" href="lobby/type.LobbyId.html" title="type discord_sdk::lobby::LobbyId">LobbyId</a>, <br> data: <a class="enum" href="lobby/enum.LobbyMessage.html" title="enum discord_sdk::lobby::LobbyMessage">LobbyMessage</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.unit.html">()</a>, <a class="enum" href="error/enum.Error.html" title="enum discord_sdk::error::Error">Error</a>></h4></div></summary><div class="docblock"><p>Sends a message to the lobby on behalf of the current user. The</p>
|
||
<h5 id="errors-3" class="section-header"><a href="#errors-3">Errors</a></h5>
|
||
<p>You must be connected to the lobby you are messaging.
|
||
This method has a rate limit of 10 messages per 5 seconds.</p>
|
||
<p><a href="https://discord.com/developers/docs/game-sdk/lobbies#sendlobbymessage">API docs</a></p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.connect_lobby_voice" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/discord_sdk/lobby.rs.html#447-453" title="goto source code">[src]</a></div><a href="#method.connect_lobby_voice" class="anchor"></a><h4 class="code-header">pub async fn <a href="#method.connect_lobby_voice" class="fnname">connect_lobby_voice</a>(&self, id: <a class="type" href="lobby/type.LobbyId.html" title="type discord_sdk::lobby::LobbyId">LobbyId</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.unit.html">()</a>, <a class="enum" href="error/enum.Error.html" title="enum discord_sdk::error::Error">Error</a>></h4></div></summary><div class="docblock"><p>Connects to the voice channel of the specified lobby.</p>
|
||
<h5 id="errors-4" class="section-header"><a href="#errors-4">Errors</a></h5>
|
||
<p>The user must be connected to the specified lobby.</p>
|
||
<p><a href="https://discord.com/developers/docs/game-sdk/lobbies#connectvoice">API docs</a></p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.disconnect_lobby_voice" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/discord_sdk/lobby.rs.html#463-469" title="goto source code">[src]</a></div><a href="#method.disconnect_lobby_voice" class="anchor"></a><h4 class="code-header">pub async fn <a href="#method.disconnect_lobby_voice" class="fnname">disconnect_lobby_voice</a>(&self, id: <a class="type" href="lobby/type.LobbyId.html" title="type discord_sdk::lobby::LobbyId">LobbyId</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.unit.html">()</a>, <a class="enum" href="error/enum.Error.html" title="enum discord_sdk::error::Error">Error</a>></h4></div></summary><div class="docblock"><p>Disconnects from the voice channel of the specified lobby.</p>
|
||
<h5 id="errors-5" class="section-header"><a href="#errors-5">Errors</a></h5>
|
||
<p>The user must be connected to the specified lobby, and be connected to
|
||
the voice channel already</p>
|
||
<p><a href="https://discord.com/developers/docs/game-sdk/lobbies#disconnectvoice">API docs</a></p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.update_lobby_member" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/discord_sdk/lobby.rs.html#474-499" title="goto source code">[src]</a></div><a href="#method.update_lobby_member" class="anchor"></a><h4 class="code-header">pub async fn <a href="#method.update_lobby_member" class="fnname">update_lobby_member</a>(<br> &self, <br> lobby_id: <a class="type" href="lobby/type.LobbyId.html" title="type discord_sdk::lobby::LobbyId">LobbyId</a>, <br> user_id: <a class="type" href="user/type.UserId.html" title="type discord_sdk::user::UserId">UserId</a>, <br> metadata: <a class="type" href="lobby/type.Metadata.html" title="type discord_sdk::lobby::Metadata">Metadata</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.unit.html">()</a>, <a class="enum" href="error/enum.Error.html" title="enum discord_sdk::error::Error">Error</a>></h4></div></summary><div class="docblock"><p>Updates the metadata for the specified lobby member.</p>
|
||
<p><a href="https://discord.com/developers/docs/game-sdk/lobbies#updatemember">API docs</a></p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-3" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/discord_sdk/overlay.rs.html#93-192" title="goto source code">[src]</a></div><a href="#impl-3" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.Discord.html" title="struct discord_sdk::Discord">Discord</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.set_overlay_visibility" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/discord_sdk/overlay.rs.html#98-107" title="goto source code">[src]</a></div><a href="#method.set_overlay_visibility" class="anchor"></a><h4 class="code-header">pub async fn <a href="#method.set_overlay_visibility" class="fnname">set_overlay_visibility</a>(<br> &self, <br> visibility: <a class="enum" href="overlay/enum.Visibility.html" title="enum discord_sdk::overlay::Visibility">Visibility</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.unit.html">()</a>, <a class="enum" href="error/enum.Error.html" title="enum discord_sdk::error::Error">Error</a>></h4></div></summary><div class="docblock"><p>Opens or closes the overlay. If the overlay is not enabled this will
|
||
instead focus the Discord app itself.</p>
|
||
<p><a href="https://discord.com/developers/docs/game-sdk/overlay#setlocked">API docs</a></p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.open_activity_invite" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/discord_sdk/overlay.rs.html#119-140" title="goto source code">[src]</a></div><a href="#method.open_activity_invite" class="anchor"></a><h4 class="code-header">pub async fn <a href="#method.open_activity_invite" class="fnname">open_activity_invite</a>(<br> &self, <br> action: <a class="enum" href="overlay/enum.InviteAction.html" title="enum discord_sdk::overlay::InviteAction">InviteAction</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.unit.html">()</a>, <a class="enum" href="error/enum.Error.html" title="enum discord_sdk::error::Error">Error</a>></h4></div></summary><div class="docblock"><p>Opens the overlay modal for sending game invitations to users, channels,
|
||
and servers.</p>
|
||
<h5 id="errors-6" class="section-header"><a href="#errors-6">Errors</a></h5>
|
||
<p>If you do not have a valid activity with all the required fields, this
|
||
call will error. See
|
||
<a href="https://discord.com/developers/docs/game-sdk/activities#activity-action-field-requirements">Activity Action Field Requirements</a>
|
||
for the fields required to have join and spectate invites function properly.</p>
|
||
<p><a href="https://discord.com/developers/docs/game-sdk/overlay#openactivityinvite">API docs</a></p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.open_guild_invite" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/discord_sdk/overlay.rs.html#150-180" title="goto source code">[src]</a></div><a href="#method.open_guild_invite" class="anchor"></a><h4 class="code-header">pub async fn <a href="#method.open_guild_invite" class="fnname">open_guild_invite</a>(<br> &self, <br> code: impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>><br>) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.unit.html">()</a>, <a class="enum" href="error/enum.Error.html" title="enum discord_sdk::error::Error">Error</a>></h4></div></summary><div class="docblock"><p>Opens the overlay modal for joining a Discord guild, given its invite code.
|
||
Unlike the normal SDK, this method automatically parses the code from
|
||
the provided string so you don’t need to do it yourself.</p>
|
||
<p>Note that just because the result might be <a href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html#variant.Ok" title="Result::Ok"><code>Result::Ok</code></a> doesn’t
|
||
necessarily mean the user accepted the invite.</p>
|
||
<p><a href="https://discord.com/developers/docs/game-sdk/overlay#openguildinvite">API docs</a></p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.open_voice_settings" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/discord_sdk/overlay.rs.html#185-191" title="goto source code">[src]</a></div><a href="#method.open_voice_settings" class="anchor"></a><h4 class="code-header">pub async fn <a href="#method.open_voice_settings" class="fnname">open_voice_settings</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.unit.html">()</a>, <a class="enum" href="error/enum.Error.html" title="enum discord_sdk::error::Error">Error</a>></h4></div></summary><div class="docblock"><p>Opens the overlay widget for voice settings for the currently connected application.</p>
|
||
<p><a href="https://discord.com/developers/docs/game-sdk/overlay#openvoicesettings">API docs</a></p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-4" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/discord_sdk/relations.rs.html#117-132" title="goto source code">[src]</a></div><a href="#impl-4" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.Discord.html" title="struct discord_sdk::Discord">Discord</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_relationships" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/discord_sdk/relations.rs.html#125-131" title="goto source code">[src]</a></div><a href="#method.get_relationships" class="anchor"></a><h4 class="code-header">pub async fn <a href="#method.get_relationships" class="fnname">get_relationships</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="relations/struct.Relationship.html" title="struct discord_sdk::relations::Relationship">Relationship</a>>, <a class="enum" href="error/enum.Error.html" title="enum discord_sdk::error::Error">Error</a>></h4></div></summary><div class="docblock"><p>The regular Game SDK does not really expose this functionality directly,
|
||
but rather exposed via the “on refresh” event as described in the
|
||
<a href="https://discord.com/developers/docs/game-sdk/relationships#onrefresh">docs</a>.</p>
|
||
<p>Basically, this method should be used to bootstrap the relationships for
|
||
the current user, with updates to that list coming via the
|
||
<a href="enum.Event.html#variant.RelationshipUpdate"><code>RelationshipUpdate</code></a> event</p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-5" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/discord_sdk/voice.rs.html#79-158" title="goto source code">[src]</a></div><a href="#impl-5" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.Discord.html" title="struct discord_sdk::Discord">Discord</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.update_voice_settings" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/discord_sdk/voice.rs.html#81-87" title="goto source code">[src]</a></div><a href="#method.update_voice_settings" class="anchor"></a><h4 class="code-header">pub async fn <a href="#method.update_voice_settings" class="fnname">update_voice_settings</a>(<br> &self, <br> settings: <a class="struct" href="voice/struct.VoiceSettingsSelf.html" title="struct discord_sdk::voice::VoiceSettingsSelf">VoiceSettingsSelf</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.unit.html">()</a>, <a class="enum" href="error/enum.Error.html" title="enum discord_sdk::error::Error">Error</a>></h4></div></summary><div class="docblock"><p>Changes whether the local user is muted and/or deafened</p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.voice_set_input_mode" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/discord_sdk/voice.rs.html#94-105" title="goto source code">[src]</a></div><a href="#method.voice_set_input_mode" class="anchor"></a><h4 class="code-header">pub async fn <a href="#method.voice_set_input_mode" class="fnname">voice_set_input_mode</a>(<br> &self, <br> input_mode: <a class="enum" href="voice/enum.InputMode.html" title="enum discord_sdk::voice::InputMode">InputMode</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.unit.html">()</a>, <a class="enum" href="error/enum.Error.html" title="enum discord_sdk::error::Error">Error</a>></h4></div></summary><div class="docblock"><p>Sets a new voice input mode for the user. Refer to <a href="https://discord.com/developers/docs/game-sdk/discord-voice#data-models-shortcut-keys">Shortcut Keys</a>
|
||
for a table of valid values for shortcuts.</p>
|
||
<p><a href="https://discord.com/developers/docs/game-sdk/discord-voice#setinputmode">API docs</a></p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.voice_mute_user" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/discord_sdk/voice.rs.html#110-128" title="goto source code">[src]</a></div><a href="#method.voice_mute_user" class="anchor"></a><h4 class="code-header">pub async fn <a href="#method.voice_mute_user" class="fnname">voice_mute_user</a>(<br> &self, <br> user: <a class="type" href="user/type.UserId.html" title="type discord_sdk::user::UserId">UserId</a>, <br> mute: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.unit.html">()</a>, <a class="enum" href="error/enum.Error.html" title="enum discord_sdk::error::Error">Error</a>></h4></div></summary><div class="docblock"><p>Mutes or unmutes the given user for the currently connected user.</p>
|
||
<p><a href="https://discord.com/developers/docs/game-sdk/discord-voice#setlocalmute">API docs</a></p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.voice_set_user_volume" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/discord_sdk/voice.rs.html#137-157" title="goto source code">[src]</a></div><a href="#method.voice_set_user_volume" class="anchor"></a><h4 class="code-header">pub async fn <a href="#method.voice_set_user_volume" class="fnname">voice_set_user_volume</a>(<br> &self, <br> user: <a class="type" href="user/type.UserId.html" title="type discord_sdk::user::UserId">UserId</a>, <br> volume: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u8.html">u8</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u8.html">u8</a>, <a class="enum" href="error/enum.Error.html" title="enum discord_sdk::error::Error">Error</a>></h4></div></summary><div class="docblock"><p>Sets the local volume for a given user. This is the volume level at
|
||
which the currently connected users hears the given user speak. Valid
|
||
volume values are from 0 to 200, with 100 being the default. Lower than
|
||
100 will be a reduced volume level from default, whereas over 100 will
|
||
be a boosted volume level from default.</p>
|
||
<p><a href="https://discord.com/developers/docs/game-sdk/discord-voice#setlocalvolume">API docs</a></p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-6" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/discord_sdk/lib.rs.html#157-239" title="goto source code">[src]</a></div><a href="#impl-6" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.Discord.html" title="struct discord_sdk::Discord">Discord</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.new" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/discord_sdk/lib.rs.html#160-193" title="goto source code">[src]</a></div><a href="#method.new" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.new" class="fnname">new</a>(<br> app: impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="enum.DiscordApp.html" title="enum discord_sdk::DiscordApp">DiscordApp</a>>, <br> subscriptions: <a class="struct" href="struct.Subscriptions.html" title="struct discord_sdk::Subscriptions">Subscriptions</a>, <br> handler: <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="trait.DiscordHandler.html" title="trait discord_sdk::DiscordHandler">DiscordHandler</a>><br>) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, <a class="enum" href="error/enum.Error.html" title="enum discord_sdk::error::Error">Error</a>></h4></div></summary><div class="docblock"><p>Creates a new Discord connection for the specified application, providing
|
||
a <a href="trait.DiscordHandler.html" title="DiscordHandler"><code>DiscordHandler</code></a> which can handle events as they arrive from Discord</p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.disconnect" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/discord_sdk/lib.rs.html#197-201" title="goto source code">[src]</a></div><a href="#method.disconnect" class="anchor"></a><h4 class="code-header">pub async fn <a href="#method.disconnect" class="fnname">disconnect</a>(self)</h4></div></summary><div class="docblock"><p>Disconnects from Discord, shutting down the tasks that have been created
|
||
to handle sending and receiving messages from it.</p>
|
||
</div></details></div></details><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><div id="impl-RefUnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-RefUnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl !<a class="trait" href="https://doc.rust-lang.org/1.59.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Discord.html" title="struct discord_sdk::Discord">Discord</a></h3></div><div id="impl-Send" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Send" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Discord.html" title="struct discord_sdk::Discord">Discord</a></h3></div><div id="impl-Sync" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Sync" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Discord.html" title="struct discord_sdk::Discord">Discord</a></h3></div><div id="impl-Unpin" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Unpin" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Discord.html" title="struct discord_sdk::Discord">Discord</a></h3></div><div id="impl-UnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-UnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl !<a class="trait" href="https://doc.rust-lang.org/1.59.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Discord.html" title="struct discord_sdk::Discord">Discord</a></h3></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Any" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/any.rs.html#132-136" title="goto source code">[src]</a></div><a href="#impl-Any" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.59.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/any.rs.html#133" title="goto source code">[src]</a></div><a href="#method.type_id" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.59.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.59.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.59.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Borrow%3CT%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/borrow.rs.html#209-214" title="goto source code">[src]</a></div><a href="#impl-Borrow%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.59.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/borrow.rs.html#211" title="goto source code">[src]</a></div><a href="#method.borrow" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.59.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.reference.html">&</a>T</h4></div></summary><div class='docblock'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.59.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-BorrowMut%3CT%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/borrow.rs.html#218-222" title="goto source code">[src]</a></div><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.59.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow_mut" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/borrow.rs.html#219" title="goto source code">[src]</a></div><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.59.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.reference.html">&mut </a>T</h4></div></summary><div class='docblock'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.59.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-From%3CT%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/convert/mod.rs.html#550-554" title="goto source code">[src]</a></div><a href="#impl-From%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/convert/mod.rs.html#551" title="goto source code">[src]</a></div><a href="#method.from" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.59.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4></div></summary><div class='docblock'><p>Performs the conversion.</p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Instrument" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/tracing/instrument.rs.html#276" title="goto source code">[src]</a></div><a href="#impl-Instrument" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="../tracing/instrument/trait.Instrument.html" title="trait tracing::instrument::Instrument">Instrument</a> for T</h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.instrument" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/tracing/instrument.rs.html#82" title="goto source code">[src]</a></div><a href="#method.instrument" class="anchor"></a><h4 class="code-header">fn <a href="../tracing/instrument/trait.Instrument.html#method.instrument" class="fnname">instrument</a>(self, span: <a class="struct" href="../tracing/span/struct.Span.html" title="struct tracing::span::Span">Span</a>) -> <a class="struct" href="../tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a><Self></h4></div></summary><div class='docblock'><p>Instruments this type with the provided <a href="../tracing/span/struct.Span.html" title="Span"><code>Span</code></a>, returning an
|
||
<code>Instrumented</code> wrapper. <a href="../tracing/instrument/trait.Instrument.html#method.instrument">Read more</a></p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.in_current_span" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/tracing/instrument.rs.html#121" title="goto source code">[src]</a></div><a href="#method.in_current_span" class="anchor"></a><h4 class="code-header">fn <a href="../tracing/instrument/trait.Instrument.html#method.in_current_span" class="fnname">in_current_span</a>(self) -> <a class="struct" href="../tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a><Self></h4></div></summary><div class='docblock'><p>Instruments this type with the <a href="../tracing/span/struct.Span.html#method.current">current</a> <a href="../tracing/span/struct.Span.html"><code>Span</code></a>, returning an
|
||
<code>Instrumented</code> wrapper. <a href="../tracing/instrument/trait.Instrument.html#method.in_current_span">Read more</a></p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Into%3CU%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/convert/mod.rs.html#538-545" title="goto source code">[src]</a></div><a href="#impl-Into%3CU%3E" class="anchor"></a><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.into" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/convert/mod.rs.html#542" title="goto source code">[src]</a></div><a href="#method.into" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4></div></summary><div class='docblock'><p>Performs the conversion.</p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-TryFrom%3CU%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/convert/mod.rs.html#588-597" title="goto source code">[src]</a></div><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error-1" class="type trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_from" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/convert/mod.rs.html#594" title="goto source code">[src]</a></div><a href="#method.try_from" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></div></summary><div class='docblock'><p>Performs the conversion.</p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-TryInto%3CU%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/convert/mod.rs.html#574-583" title="goto source code">[src]</a></div><a href="#impl-TryInto%3CU%3E" class="anchor"></a><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error" class="type trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_into" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.59.0/src/core/convert/mod.rs.html#580" title="goto source code">[src]</a></div><a href="#method.try_into" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></div></summary><div class='docblock'><p>Performs the conversion.</p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-WithSubscriber" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/tracing/instrument.rs.html#334" title="goto source code">[src]</a></div><a href="#impl-WithSubscriber" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="../tracing/instrument/trait.WithSubscriber.html" title="trait tracing::instrument::WithSubscriber">WithSubscriber</a> for T</h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.with_subscriber" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/tracing/instrument.rs.html#169-171" title="goto source code">[src]</a></div><a href="#method.with_subscriber" class="anchor"></a><h4 class="code-header">fn <a href="../tracing/instrument/trait.WithSubscriber.html#method.with_subscriber" class="fnname">with_subscriber</a><S>(self, subscriber: S) -> <a class="struct" href="../tracing/instrument/struct.WithDispatch.html" title="struct tracing::instrument::WithDispatch">WithDispatch</a><Self> <span class="where fmt-newline">where<br> S: <a class="trait" href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="../tracing_core/dispatcher/struct.Dispatch.html" title="struct tracing_core::dispatcher::Dispatch">Dispatch</a>>, </span></h4></div></summary><div class='docblock'><p>Attaches the provided <a href="../tracing_core/subscriber/trait.Subscriber.html"><code>Subscriber</code></a> to this type, returning a
|
||
<a href="../tracing/instrument/struct.WithDispatch.html" title="WithDispatch"><code>WithDispatch</code></a> wrapper. <a href="../tracing/instrument/trait.WithSubscriber.html#method.with_subscriber">Read more</a></p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.with_current_subscriber" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/tracing/instrument.rs.html#221" title="goto source code">[src]</a></div><a href="#method.with_current_subscriber" class="anchor"></a><h4 class="code-header">fn <a href="../tracing/instrument/trait.WithSubscriber.html#method.with_current_subscriber" class="fnname">with_current_subscriber</a>(self) -> <a class="struct" href="../tracing/instrument/struct.WithDispatch.html" title="struct tracing::instrument::WithDispatch">WithDispatch</a><Self></h4></div></summary><div class='docblock'><p>Attaches the current <a href="../tracing/dispatcher/index.html#setting-the-default-subscriber">default</a> <a href="../tracing_core/subscriber/trait.Subscriber.html"><code>Subscriber</code></a> to this type, returning a
|
||
<a href="../tracing/instrument/struct.WithDispatch.html" title="WithDispatch"><code>WithDispatch</code></a> wrapper. <a href="../tracing/instrument/trait.WithSubscriber.html#method.with_current_subscriber">Read more</a></p>
|
||
</div></details></div></details></div></section><section id="search" class="content hidden"></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="discord_sdk" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.59.0 (9d1b2106e 2022-02-23)" ></div>
|
||
</body></html> |