Trait ModStateHost
pub trait ModStateHost {
// Provided methods
fn attachment_query(&self, namespace: &str, name: &str) -> AttachmentBatch { ... }
fn attachments(&mut self) -> &mut dyn AttachmentStore { ... }
}Expand description
The host’s methods both sides share of the mod_state area, implemented by the game and reached through Host.
Provided Methods§
fn attachment_query(&self, namespace: &str, name: &str) -> AttachmentBatch
fn attachment_query(&self, namespace: &str, name: &str) -> AttachmentBatch
Side: both. Capture a SNAPSHOT of the current dimension’s attachment residency and values. Later changes require a fresh query. Removed-but-unswept entities may appear; writes through stale holders fail. Values are neither cloned nor eagerly decoded.
fn attachments(&mut self) -> &mut dyn AttachmentStore
fn attachments(&mut self) -> &mut dyn AttachmentStore
Side: both.
The server-owned holders’ attachments; TYPE.get(host, holder) reads
one. On a client it is the copy of what the server synced: set and
remove change only the copy.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".