Skip to main content

TypesClient

Trait TypesClient 

Source
pub trait TypesClient: Send + Sync {
    // Required method
    fn is_ready<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<bool, TypesError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Public API trait for the types module.

This trait can be consumed by other modules via ClientHub:

let client = hub.get::<dyn TypesClient>()?;
let ready = client.is_ready().await?;

The types module is responsible for registering core GTS types that other modules depend on (e.g., BaseModkitPluginV1).

Required Methods§

Source

fn is_ready<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<bool, TypesError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Check if core types have been registered.

§Returns

true if core types are registered and ready.

§Errors

Returns an error if the check fails.

Implementors§