pub struct Client {
pub shard: Arc<Shard>,
pub http: Arc<HttpClient>,
pub cache: Arc<InMemoryCache>,
pub framework: Option<Arc<Framework>>,
pub event_handler: Option<Arc<dyn EventHandler>>,
/* private fields */
}Expand description
The main Titanium Client.
This struct holds the connection to Discord, including the Gateway Shard(s) and the HTTP client. It is the main entry point for your bot.
Fields§
§shard: Arc<Shard>§http: Arc<HttpClient>§cache: Arc<InMemoryCache>§framework: Option<Arc<Framework>>§event_handler: Option<Arc<dyn EventHandler>>Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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