Struct serenity::utils::ContentSafeOptions[][src]

pub struct ContentSafeOptions { /* fields omitted */ }
Expand description

Struct that allows to alter content_safe’s behaviour.

Implementations

content_safe will replace role mentions (<@&{id}>) with its name prefixed with @ (@rolename) or with @deleted-role if the identifier is invalid.

If set to true, content_safe will replace user mentions (<@!{id}> or <@{id}>) with the user’s name prefixed with @ (@username) or with @invalid-user if the identifier is invalid.

If set to true, content_safe will replace channel mentions (<#{id}>) with the channel’s name prefixed with # (#channelname) or with #deleted-channel if the identifier is invalid.

If set to true, if content_safe replaces a user mention it will add their four digit discriminator with a preceeding #, turning @username to @username#discriminator.

If set, content_safe will replace a user mention with the user’s display name in passed guild.

If set, content_safe will replace @here with a non-pinging alternative.

If set, content_safe will replace @everyone with a non-pinging alternative.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Instantiates with all options set to true.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more