struct CommandAuthorizationContext {
permission_context: PermissionContext,
player_permissions: Option<PermissionSet>,
world_scope: CommandWorldScope,
}Expand description
Authorization state captured when command execution starts.
Vanilla keeps the initiating permission state when /execute changes the
execution entity, position, or world. Keeping this separate from the
mutable execution fields prevents source transforms from changing which
contextual Steel permissions apply. Player permissions come from the
persistence-published server state so delayed client refreshes cannot extend
revoked command access.
Fields§
§permission_context: PermissionContext§player_permissions: Option<PermissionSet>§world_scope: CommandWorldScopeImplementations§
Source§impl CommandAuthorizationContext
impl CommandAuthorizationContext
fn for_player(world: Identifier, permissions: PermissionSet) -> Self
fn unrestricted(world: Identifier) -> Self
const fn permission_context(&self) -> &PermissionContext
fn permission_state( &self, permission: &PermissionExpr, ) -> Option<PermissionState>
fn allows_execution_domain(&self, domain: &str) -> bool
Trait Implementations§
Source§impl Clone for CommandAuthorizationContext
impl Clone for CommandAuthorizationContext
Source§fn clone(&self) -> CommandAuthorizationContext
fn clone(&self) -> CommandAuthorizationContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CommandAuthorizationContext
impl Debug for CommandAuthorizationContext
impl Eq for CommandAuthorizationContext
impl StructuralPartialEq for CommandAuthorizationContext
Auto Trait Implementations§
impl Freeze for CommandAuthorizationContext
impl RefUnwindSafe for CommandAuthorizationContext
impl Send for CommandAuthorizationContext
impl Sync for CommandAuthorizationContext
impl Unpin for CommandAuthorizationContext
impl UnsafeUnpin for CommandAuthorizationContext
impl UnwindSafe for CommandAuthorizationContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compares
self with key and returns true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreWraps this value in an
Arc<SyncMutex<>>