[−][src]Struct serenity::client::Extras
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]
H: EventHandler + 'static,
Set the handler for managing discord events.
pub fn raw_event_handler<H>(&mut self, handler: H) -> &mut Self where
H: RawEventHandler + 'static,
[src]
H: RawEventHandler + 'static,
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]
&mut self,
framework: F
) -> &mut Self
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
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,