Skip to main content

HostEntityAuthStatus

Struct HostEntityAuthStatus 

Source
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

Source

pub fn new(host_type: HostType, auth_status: EntityAuthStatus) -> Self

Creates a HostEntityAuthStatus for host_type at the given auth_status.

Source

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.

Source

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.

Source

pub fn can_mutate(&self) -> bool

Returns true if this host may mutate component properties on the entity.

Source

pub fn can_read(&self) -> bool

Returns true if this host may read component values from the entity’s delegated properties.

Source

pub fn can_write(&self) -> bool

Returns true if this host may write (serialize) delegated entity properties for the wire.

Source

pub fn status(&self) -> EntityAuthStatus

Returns the underlying EntityAuthStatus value.

Trait Implementations§

Source§

impl Debug for HostEntityAuthStatus

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V