pub struct ShardConfig {
pub token: String,
pub intents: Intents,
pub gateway_url: String,
pub large_threshold: u8,
pub compress: bool,
pub max_reconnect_attempts: u32,
pub reconnect_base_delay_ms: u64,
pub reconnect_max_delay_ms: u64,
}Expand description
Configuration for a shard.
Fields§
§token: StringBot token.
intents: IntentsGateway intents.
gateway_url: StringGateway URL (usually from /gateway/bot).
large_threshold: u8Large guild threshold (50-250).
compress: boolEnable zlib compression.
max_reconnect_attempts: u32Maximum reconnection attempts before giving up.
reconnect_base_delay_ms: u64Base reconnect delay in milliseconds.
reconnect_max_delay_ms: u64Maximum reconnect delay in milliseconds.
Implementations§
Trait Implementations§
Source§impl Clone for ShardConfig
impl Clone for ShardConfig
Source§fn clone(&self) -> ShardConfig
fn clone(&self) -> ShardConfig
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 moreAuto Trait Implementations§
impl Freeze for ShardConfig
impl RefUnwindSafe for ShardConfig
impl Send for ShardConfig
impl Sync for ShardConfig
impl Unpin for ShardConfig
impl UnwindSafe for ShardConfig
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