pub struct HostEntityAuthStatus { /* private fields */ }Expand description
Combined view of an entity’s authority status from a specific endpoint’s perspective.
Implementations§
Source§impl HostEntityAuthStatus
impl HostEntityAuthStatus
Sourcepub fn new(host_type: HostType, auth_status: EntityAuthStatus) -> Self
pub fn new(host_type: HostType, auth_status: EntityAuthStatus) -> Self
Creates a HostEntityAuthStatus for host_type at the given auth_status.
Sourcepub fn can_request(&self) -> bool
pub fn can_request(&self) -> bool
Can this host transition into Requested?
Authority delegation is a client-initiated flow: the server owns
every entity by default and grants/denies client requests. The
server itself never requests authority — it already has it —
so this method only has meaningful semantics for HostType::Client.
Server-side HostEntityAuthStatus instances exist (the server
tracks per-entity auth state in server_auth_handler.rs), but
the only callers of can_request are in
client/src/world/global_world_manager.rs::entity_request_authority.
Reaching a (HostType::Server, *) arm here means a server-side
caller mistakenly drove the client request flow against a server
auth status — a contract violation worth surfacing loudly.
Sourcepub fn can_release(&self) -> bool
pub fn can_release(&self) -> bool
Can this host transition into Releasing?
Symmetric to can_request: only the client releases authority
(the server grants/revokes). Server-side instances should never
reach this method. The only caller is
client/src/world/global_world_manager.rs::entity_release_authority.
Sourcepub fn can_mutate(&self) -> bool
pub fn can_mutate(&self) -> bool
Returns true if this host may mutate component properties on the entity.
Sourcepub fn can_read(&self) -> bool
pub fn can_read(&self) -> bool
Returns true if this host may read component values from the entity’s delegated properties.
Sourcepub fn can_write(&self) -> bool
pub fn can_write(&self) -> bool
Returns true if this host may write (serialize) delegated entity properties for the wire.
Sourcepub fn status(&self) -> EntityAuthStatus
pub fn status(&self) -> EntityAuthStatus
Returns the underlying EntityAuthStatus value.