pub struct IdentifyPayload<'a> {
pub token: Cow<'a, str>,
pub intents: Intents,
pub properties: ConnectionProperties<'a>,
pub compress: Option<bool>,
pub large_threshold: Option<u8>,
pub shard: Option<[u16; 2]>,
pub presence: Option<PresenceUpdate>,
}Expand description
Payload for the Identify opcode (op 2).
Sent to authenticate and start a new session.
Fields§
§token: Cow<'a, str>Authentication token.
intents: IntentsGateway intents.
properties: ConnectionProperties<'a>Connection properties.
compress: Option<bool>Whether to enable payload compression.
large_threshold: Option<u8>Threshold for large guilds (50-250, default 50).
shard: Option<[u16; 2]>Shard information: [shard_id, total_shards].
presence: Option<PresenceUpdate>Initial presence.
Implementations§
Trait Implementations§
Source§impl<'a> Clone for IdentifyPayload<'a>
impl<'a> Clone for IdentifyPayload<'a>
Source§fn clone(&self) -> IdentifyPayload<'a>
fn clone(&self) -> IdentifyPayload<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for IdentifyPayload<'a>
impl<'a> Debug for IdentifyPayload<'a>
Auto Trait Implementations§
impl<'a> Freeze for IdentifyPayload<'a>
impl<'a> RefUnwindSafe for IdentifyPayload<'a>
impl<'a> Send for IdentifyPayload<'a>
impl<'a> Sync for IdentifyPayload<'a>
impl<'a> Unpin for IdentifyPayload<'a>
impl<'a> UnwindSafe for IdentifyPayload<'a>
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