Module twilight_cache_inmemory::permission [−][src]
This is supported on crate feature
permission-calculator
only.Expand description
Calculate the permissions for members in on a guild- or channel-level with information from the cache.
Required Configuration
Calculating permissions required that some information relevant to the
member, their roles, and the channel or guild is available in the cache.
These will only be stored in the cache when certain ResourceType
s are
enabled. To enable the configurations for both the
InMemoryCachePermissions::in_channel
and
InMemoryCachePermissions::root
operations you must enable
their required ResourceType
s like so:
use twilight_cache_inmemory::{InMemoryCache, ResourceType}; let resource_types = ResourceType::CHANNEL | ResourceType::MEMBER | ResourceType::ROLE; let cache = InMemoryCache::builder().resource_types(resource_types).build();
Structs
Error calculating permissions with the information in a cache.
Calculate the permissions of a member with information from the cache.
Error calculating permissions with information in a cache.