pub struct CachedActivity {
Show 24 fields pub user_id: Id<UserMarker>, pub guild_id: Id<GuildMarker>, pub application_id: Option<Id<ApplicationMarker>>, pub asset_large_image: Option<String>, pub asset_large_text: Option<String>, pub asset_small_image: Option<String>, pub asset_small_text: Option<String>, pub created_at: Option<u64>, pub details: Option<String>, pub emoji_animated: Option<bool>, pub emoji_name: Option<String>, pub emoji_id: Option<String>, pub flags: Option<ActivityFlags>, pub id: Option<String>, pub instance: Option<bool>, pub kind: ActivityType, pub name: String, pub party_id: Option<String>, pub party_size_current: Option<u64>, pub party_size_max: Option<u64>, pub state: Option<String>, pub timestamp_end: Option<u64>, pub timestamp_start: Option<u64>, pub url: Option<String>,
}
Expand description

A cached activity

It is the same as twilight_model::gateway::presence::Activity except:

  • user_id field is added, making it possible to return a user’s activities

  • guild_id field is added, making it possible to return the activities of a guild’s members

  • buttons field is removed, as caching it is likely unnecessary, if you need this field, please create an issue

  • assets, emoji, party and timestamps fields are flattened, making this struct easier to cache

  • secrets field is removed, as it’s not sent to bots

Fields

user_id: Id<UserMarker>guild_id: Id<GuildMarker>application_id: Option<Id<ApplicationMarker>>asset_large_image: Option<String>asset_large_text: Option<String>asset_small_image: Option<String>asset_small_text: Option<String>created_at: Option<u64>details: Option<String>emoji_animated: Option<bool>emoji_name: Option<String>emoji_id: Option<String>flags: Option<ActivityFlags>id: Option<String>instance: Option<bool>kind: ActivityTypename: Stringparty_id: Option<String>party_size_current: Option<u64>party_size_max: Option<u64>state: Option<String>timestamp_end: Option<u64>timestamp_start: Option<u64>url: Option<String>

Implementations

Create a cached activity from a given activity, user ID and guild ID

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

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

Returns the argument unchanged.

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

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
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