[][src]Struct twilight_cache_inmemory::InMemoryCacheBuilder

pub struct InMemoryCacheBuilder(_);

Builder to configure and construct an InMemoryCache.

Implementations

impl InMemoryCacheBuilder[src]

pub fn new() -> Self[src]

Creates a builder to configure and construct an InMemoryCache.

pub fn build(self) -> InMemoryCache[src]

Consume the builder, returning a configured cache.

pub fn event_types(mut self: Self, event_types: EventType) -> Self[src]

Sets the list of event types for the cache to handle.

Defaults to all types.

pub fn message_cache_size(mut self: Self, message_cache_size: usize) -> Self[src]

Sets the number of messages to cache per channel.

Defaults to 100.

Trait Implementations

impl Clone for InMemoryCacheBuilder[src]

impl Debug for InMemoryCacheBuilder[src]

impl Default for InMemoryCacheBuilder[src]

impl Eq for InMemoryCacheBuilder[src]

impl PartialEq<InMemoryCacheBuilder> for InMemoryCacheBuilder[src]

impl StructuralEq for InMemoryCacheBuilder[src]

impl StructuralPartialEq for InMemoryCacheBuilder[src]

Auto Trait Implementations

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, U> Into<U> for T where
    U: From<T>, 
[src]

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.