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

pub struct Extras { /* fields omitted */ }

A builder to extra things for altering the Client.

Methods

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 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.

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.

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> CloneAny for T where
    T: Clone + Any
[src]

impl<T> DebugAny for T where
    T: Any + Debug
[src]

impl<T> From<T> 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<T> UnsafeAny for T where
    T: Any

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