Enum sparkle_cache::cache::Error
source · pub enum Error<E: Send> {
Backend(E),
CurrentUserMissing,
MemberRoleMissing {
user_id: Id<UserMarker>,
role_id: Id<RoleMarker>,
},
MemberBadTimeoutTimestamp(Box<CachedMember>),
PermissionsChannelMissing(Id<ChannelMarker>),
PermissionsGuildMissing(Id<GuildMarker>),
PermissionsMemberMissing {
user_id: Id<UserMarker>,
guild_id: Id<GuildMarker>,
},
PermissionsGuildEveryoneRoleMissing(Id<GuildMarker>),
PermissionsChannelNotInGuild(Box<CachedChannel>),
}Expand description
The errors the cache might return
Variants
Backend(E)
An error was returned by the backend
CurrentUserMissing
The current user isn’t in the cache
MemberRoleMissing
One of the roles of the member to cache isn’t in the cache
MemberBadTimeoutTimestamp(Box<CachedMember>)
The timestamp the member’s communication is disabled until isn’t valid
PermissionsChannelMissing(Id<ChannelMarker>)
The channel to calculate permissions for isn’t in the cache
PermissionsGuildMissing(Id<GuildMarker>)
The guild to calculate permissions for isn’t in the cache
PermissionsMemberMissing
The member to calculate permissions for isn’t in the cache
PermissionsGuildEveryoneRoleMissing(Id<GuildMarker>)
The everyone role in the guild to calculate permissions for isn’t in the cache
PermissionsChannelNotInGuild(Box<CachedChannel>)
The given channel to calculate permissions for doesn’t have a guild ID
Trait Implementations
sourceimpl<E: Send> Error for Error<E>where
Self: Debug + Display,
impl<E: Send> Error for Error<E>where
Self: Debug + Display,
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations
impl<E> RefUnwindSafe for Error<E>where
E: RefUnwindSafe,
impl<E> Send for Error<E>
impl<E> Sync for Error<E>where
E: Sync,
impl<E> Unpin for Error<E>where
E: Unpin,
impl<E> UnwindSafe for Error<E>where
E: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more