Skip to main content

ClientHost

Trait ClientHost 

pub trait ClientHost:
    Host
    + ClientInputClientHost
    + ClientOptionsClientHost
    + ClientRenderClientHost
    + ClientTextClientHost
    + ClientViewClientHost
    + ConfigClientHost
    + DrawClientHost
    + EffectsClientHost
    + ItemParticlesClientHost
    + ItemsClientHost
    + MenusClientHost
    + NetworkClientHost
    + PlayersClientHost
    + RecipesClientHost
    + ScreensClientHost
    + ServicesClientHost { }
Expand description

What only the client’s hooks are given: the client’s own services.

Trait Implementations§

§

impl AttachmentStore for dyn ClientHost + '_

§

fn holds( &mut self, holder: Holder, namespace: &str, name: &str, ) -> Result<bool, AttachmentError>

Whether holder keeps a value under namespace:name, saved or decoded.
§

fn decoded( &mut self, holder: Holder, namespace: &str, name: &str, ) -> Result<Option<Arc<dyn Any + Send + Sync>>, AttachmentError>

The value under namespace:name if it has been decoded.
§

fn saved( &mut self, holder: Holder, namespace: &str, name: &str, ) -> Result<Option<BTreeMap<JavaString, Tag>>, AttachmentError>

The saved form under namespace:name if it hasn’t been decoded yet.
§

fn store( &mut self, holder: Holder, namespace: &str, name: &str, value: Arc<dyn Any + Send + Sync>, form: AttachmentForm, ) -> Result<(), AttachmentError>

Keep value under namespace:name, with what comes with it.
§

fn discard( &mut self, holder: Holder, namespace: &str, name: &str, sync: bool, ) -> Result<(), AttachmentError>

Drop the value under namespace:name, saved or decoded; clients hear of it if sync.
§

fn queue_sync( &mut self, holder: Holder, namespace: &str, name: &str, ) -> Result<(), AttachmentError>

Send the value under namespace:name to the clients that see the holder again.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§