Struct discord_sdk::activity::Assets[][src]

pub struct Assets {
    pub large_image: Option<String>,
    pub large_text: Option<String>,
    pub small_image: Option<String>,
    pub small_text: Option<String>,
}
Expand description

The custom art assets to be used in the user’s profile when the activity is set. These assets need to be already uploaded to Discord in the application’s developer settings.

Tips

Fields

large_image: Option<String>large_text: Option<String>small_image: Option<String>small_text: Option<String>

Implementations

Sets the large image and optional text to use for the rich presence profile

The key is limited to 32 bytes on the server, so any keys over that size will be considered invalid and won’t be set. The image text is limited to 128 bytes and will be truncated if longer than that.

Sets the small image and optional text to use for the rich presence profile

The key is limited to 32 bytes on the server, so any keys over that size will be considered invalid and won’t be set. The image text is limited to 128 bytes and will be truncated if longer than that.

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

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

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

Performs the conversion.

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