Enum twilight_cache_inmemory::permission::ChannelErrorType[][src]

#[non_exhaustive]
pub enum ChannelErrorType {
    ChannelUnavailable {
        channel_id: ChannelId,
    },
    MemberUnavailable {
        guild_id: GuildId,
        user_id: UserId,
    },
    RoleUnavailable {
        role_id: RoleId,
    },
}
This is supported on crate feature permission-calculator only.
Expand description

Type of ChannelError that occurred.

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
ChannelUnavailable

Guild channel is not present in the cache.

Show fields

Fields of ChannelUnavailable

channel_id: ChannelId

ID of the channel.

MemberUnavailable

The user’s member information is not available in the guild.

This could be because the user is not currently a member of the guild or because the member entity has not yet been received by the cache.

Show fields

Fields of MemberUnavailable

guild_id: GuildId

ID of the guild.

user_id: UserId

ID of the user.

RoleUnavailable

One of the user’s roles is not available in the guild.

The reasons this could happen could be due to the cache missing a RoleCreate event or a user application race condition.

Show fields

Fields of RoleUnavailable

role_id: RoleId

ID of the role that the user has but details about is missing.

Trait Implementations

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

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 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.