#[non_exhaustive]pub struct Connection {
pub id: CompactString,
pub name: CompactString,
pub kind: ConnectionService,
pub revoked: bool,
pub integrations: Vec<PartialIntegration>,
pub verified: bool,
pub friend_sync: bool,
pub show_activity: bool,
pub two_way_link: bool,
pub visibility: ConnectionVisibility,
}Expand description
A third-party account connected
to the current user (GET /users/@me/connections, OAuth2 scope connections).
discord.js counterpart: none (discord-api-types APIConnection).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: CompactStringThe account’s ID on the service (not a snowflake).
name: CompactStringThe account’s username on the service.
kind: ConnectionServiceThe service.
revoked: boolWhether the connection is revoked.
integrations: Vec<PartialIntegration>The guild integrations that use the connection (partial objects).
verified: boolWhether the connection is verified.
friend_sync: boolWhether friend sync is enabled.
show_activity: boolWhether activities of the service are shown in presence updates.
two_way_link: boolWhether Discord holds an OAuth2 token for the service account.
visibility: ConnectionVisibilityWho can see the connection.
Trait Implementations§
Source§impl Clone for Connection
impl Clone for Connection
Source§impl Debug for Connection
impl Debug for Connection
Source§impl<'de> Deserialize<'de> for Connection
impl<'de> Deserialize<'de> for Connection
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Connection
Source§impl PartialEq for Connection
impl PartialEq for Connection
Source§impl Serialize for Connection
impl Serialize for Connection
impl StructuralPartialEq for Connection
Auto Trait Implementations§
impl Forget for Connection
impl Freeze for Connection
impl Move for Connection
impl RefUnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl UnsafeUnpin for Connection
impl UnwindSafe for Connection
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more