pub struct RemoteEntityChannel { /* private fields */ }Expand description
Per-entity demultiplexer that buffers and reorders incoming messages from an unordered reliable channel into a causal stream.
Implementations§
Source§impl RemoteEntityChannel
impl RemoteEntityChannel
Sourcepub fn new(host_type: HostType) -> Self
pub fn new(host_type: HostType) -> Self
Creates a fresh RemoteEntityChannel in the Despawned state for host_type.
Sourcepub fn new_delegated(host_type: HostType) -> Self
pub fn new_delegated(host_type: HostType) -> Self
Create a RemoteEntityChannel for a delegated entity (used during migration)
After migration, MigrateResponse has subcommand_id=0, so the next message (SetAuthority) will have subcommand_id=1. We need to sync the receiver’s next_subcommand_id accordingly.
Sourcepub fn configure_as_delegated(&mut self)
pub fn configure_as_delegated(&mut self)
Configures the auth sub-channel into the Delegated state, simulating Publish → EnableDelegation transitions.
Sourcepub fn update_auth_status(&mut self, auth_status: EntityAuthStatus)
pub fn update_auth_status(&mut self, auth_status: EntityAuthStatus)
Overrides the authority status stored in the auth sub-channel to match the global tracker after migration.
Sourcepub fn auth_status(&self) -> Option<EntityAuthStatus>
pub fn auth_status(&self) -> Option<EntityAuthStatus>
Returns the current authority status recorded in the auth sub-channel.
Sourcepub fn is_delegated(&self) -> bool
pub fn is_delegated(&self) -> bool
Returns true if the auth sub-channel is in the Delegated state.
Sourcepub fn send_command(&mut self, command: EntityCommand)
pub fn send_command(&mut self, command: EntityCommand)
Enqueues command through the authority sub-channel for outbound delivery.