Struct serenity::cache::Settings[][src]

pub struct Settings {
    pub max_messages: usize,
    // some fields omitted
}

Settings for the cache.

Examples

Create new settings, specifying the maximum number of messages:

use serenity::cache::Settings as CacheSettings;

let mut settings = CacheSettings::new();
settings.max_messages(10);

Fields

The maximum number of messages to store in a channel's message cache.

Defaults to 0.

Methods

impl Settings
[src]

Creates new settings to be used with a cache.

Important traits for &'a mut R

Sets the maximum number of messages to cache in a channel.

Refer to max_messages for more information.

Examples

Set the maximum number of messages to cache:

use serenity::cache::Settings;

let mut settings = Settings::new();
settings.max_messages(10);

Trait Implementations

impl Clone for Settings
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Settings
[src]

Formats the value using the given formatter. Read more

impl Default for Settings
[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations

impl Send for Settings

impl Sync for Settings