Trait ServerReloadResources
pub trait ServerReloadResources {
// Required method
fn retained(&self, id: &Identifier) -> Option<Arc<dyn Any + Send + Sync>>;
}Expand description
The retained server reload listeners of the last successful reload, as
NeoForge’s ReloadableServerResources, reached from
ServerHost::reload_resources. A new reload replaces the whole store.
Required Methods§
Implementations§
§impl dyn ServerReloadResources + '_
impl dyn ServerReloadResources + '_
pub fn listener<T>(&self, key: &ListenerKey<T>) -> Option<Arc<T>>where
T: ServerReloadListener,
pub fn listener<T>(&self, key: &ListenerKey<T>) -> Option<Arc<T>>where
T: ServerReloadListener,
The retained listener registered under key in the last successful
reload; None when nothing is registered under it, its type differs, or
no reload has succeeded yet. The downcast itself checks the type.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".