[][src]Struct serenity::client::Extras

pub struct Extras { /* fields omitted */ }

A builder to extra things for altering the Client.

Implementations

impl Extras[src]

pub fn event_handler<H>(&mut self, handler: H) -> &mut Self where
    H: EventHandler + 'static, 
[src]

Set the handler for managing discord events.

pub fn raw_event_handler<H>(&mut self, handler: H) -> &mut Self where
    H: RawEventHandler + 'static, 
[src]

Set the handler for raw events.

If you have set the specialised event_handler, all events will be cloned for use to the raw event handler.

pub fn framework<F: Framework + Send + Sync + 'static>(
    &mut self,
    framework: F
) -> &mut Self
[src]

Set the framework.

pub fn cache_update_timeout(&mut self, duration: Duration) -> &mut Self[src]

Set the duration the library is permitted to update the cache before giving up acquiring a write-lock.

This can be useful for avoiding deadlocks, but it also may invalidate your cache.

pub fn guild_subscriptions(&mut self, guild_subscriptions: bool) -> &mut Self[src]

Set whether the library should subscribe for listening to presence and typing events.

By default, this is true.

pub fn intents(&mut self, intents: GatewayIntents) -> &mut Self[src]

Set what Discord gateway events shall be received.

By default, no intents are being used and all events are received.

Trait Implementations

impl Clone for Extras[src]

impl Debug for Extras[src]

impl Default for Extras[src]

Auto Trait Implementations

impl !RefUnwindSafe for Extras

impl Send for Extras

impl Sync for Extras

impl Unpin for Extras

impl !UnwindSafe for Extras

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]