pub struct IdentifyPacket {
pub token: String,
pub properties: IdentifyProperties,
pub version: u8,
pub compress: bool,
pub large_threshold: i32,
pub shard: [usize; 2],
pub presence: Option<ClientPresence>,
}Expand description
Used for identifying a shard with the gateway.
Fields§
§token: StringThe token this shard will use.
properties: IdentifyPropertiesThe properties of the client.
version: u8The version of the gateway to use.
compress: boolWhether or not to compress packets.
large_threshold: i32The total number of members where the gateway will stop sending offline members in the guild member list.
shard: [usize; 2]Holds the sharding information for this shard.
presence: Option<ClientPresence>The initial presence of this shard.
Trait Implementations§
Source§impl Clone for IdentifyPacket
impl Clone for IdentifyPacket
Source§fn clone(&self) -> IdentifyPacket
fn clone(&self) -> IdentifyPacket
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 Debug for IdentifyPacket
impl Debug for IdentifyPacket
Source§impl<'de> Deserialize<'de> for IdentifyPacket
impl<'de> Deserialize<'de> for IdentifyPacket
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
Source§impl SendablePacket for IdentifyPacket
impl SendablePacket for IdentifyPacket
Auto Trait Implementations§
impl Freeze for IdentifyPacket
impl RefUnwindSafe for IdentifyPacket
impl Send for IdentifyPacket
impl Sync for IdentifyPacket
impl Unpin for IdentifyPacket
impl UnwindSafe for IdentifyPacket
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