pub struct HostAuthHandler { /* private fields */ }Expand description
Server-side registry of per-entity authority channels, tracking which entities are delegated and their current status.
Implementations§
Source§impl HostAuthHandler
impl HostAuthHandler
Sourcepub fn register_entity(
&mut self,
host_type: HostType,
entity: &GlobalEntity,
) -> EntityAuthAccessor
pub fn register_entity( &mut self, host_type: HostType, entity: &GlobalEntity, ) -> EntityAuthAccessor
Registers entity with this handler, creating an authority channel for it and returning the accessor.
Sourcepub fn deregister_entity(&mut self, entity: &GlobalEntity)
pub fn deregister_entity(&mut self, entity: &GlobalEntity)
Removes entity’s authority channel. Called on entity despawn.
Sourcepub fn get_accessor(&self, entity: &GlobalEntity) -> EntityAuthAccessor
pub fn get_accessor(&self, entity: &GlobalEntity) -> EntityAuthAccessor
Returns a cloned EntityAuthAccessor for entity. Panics if not registered.
Sourcepub fn auth_status(&self, entity: &GlobalEntity) -> Option<HostEntityAuthStatus>
pub fn auth_status(&self, entity: &GlobalEntity) -> Option<HostEntityAuthStatus>
Returns the current authority status for entity, or None if not registered.
Sourcepub fn set_auth_status(
&self,
entity: &GlobalEntity,
auth_status: EntityAuthStatus,
)
pub fn set_auth_status( &self, entity: &GlobalEntity, auth_status: EntityAuthStatus, )
Updates the authority status for entity. Panics if not registered.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HostAuthHandler
impl RefUnwindSafe for HostAuthHandler
impl Send for HostAuthHandler
impl Sync for HostAuthHandler
impl Unpin for HostAuthHandler
impl UnsafeUnpin for HostAuthHandler
impl UnwindSafe for HostAuthHandler
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