pub trait Addon: Send + Sync {
// Required method
fn descriptor(&self) -> AddonDescriptor;
// Provided methods
fn patch_mode_support(&self) -> PatchModeSupport { ... }
fn requires_runtime_hook(&self) -> bool { ... }
fn supported_game_versions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<GameVersion>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn available_versions<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_query: &'life1 AddonCatalogQuery<'life2>,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<AddonRelease>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn check_compatibility(&self, _ctx: &AddonContext<'_>) -> AddonCompatibility { ... }
fn inspect<'life0, 'life1, 'async_trait>(
&'life0 self,
_probe: &'life1 InstanceProbe,
) -> Pin<Box<dyn Future<Output = Result<Option<InstalledAddon>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn prepare<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_request: &'life1 AddonPrepareRequest<'life2>,
) -> Pin<Box<dyn Future<Output = Result<AddonPrepareOutput>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn augment_launch<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_args: &'life1 mut AddonLaunchArgs,
_ctx: &'life2 AddonLaunchContext<'life3>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait { ... }
}Expand description
Composable, host-aware extension layered onto a Minecraft instance.
Required Methods§
Sourcefn descriptor(&self) -> AddonDescriptor
fn descriptor(&self) -> AddonDescriptor
Returns the addon’s unique identifier and display name.
Provided Methods§
Sourcefn patch_mode_support(&self) -> PatchModeSupport
fn patch_mode_support(&self) -> PatchModeSupport
Declares which patch modes this addon supports.
Sourcefn requires_runtime_hook(&self) -> bool
fn requires_runtime_hook(&self) -> bool
Returns true when this addon requires code execution during launch
command construction (augment_launch) and cannot degrade to data-only.
Sourcefn supported_game_versions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<GameVersion>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn supported_game_versions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<GameVersion>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns supported game versions when this addon exposes a remote catalog.
Sourcefn available_versions<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_query: &'life1 AddonCatalogQuery<'life2>,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<AddonRelease>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn available_versions<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_query: &'life1 AddonCatalogQuery<'life2>,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<AddonRelease>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Returns available addon releases for a host driver and game version, or
None when this addon does not provide a version catalog.
Sourcefn check_compatibility(&self, _ctx: &AddonContext<'_>) -> AddonCompatibility
fn check_compatibility(&self, _ctx: &AddonContext<'_>) -> AddonCompatibility
Checks whether this addon is compatible with the host driver and game version.
Sourcefn inspect<'life0, 'life1, 'async_trait>(
&'life0 self,
_probe: &'life1 InstanceProbe,
) -> Pin<Box<dyn Future<Output = Result<Option<InstalledAddon>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn inspect<'life0, 'life1, 'async_trait>(
&'life0 self,
_probe: &'life1 InstanceProbe,
) -> Pin<Box<dyn Future<Output = Result<Option<InstalledAddon>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Detects whether an unmanaged/external copy of this addon is already present in probe.
Sourcefn prepare<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_request: &'life1 AddonPrepareRequest<'life2>,
) -> Pin<Box<dyn Future<Output = Result<AddonPrepareOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn prepare<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_request: &'life1 AddonPrepareRequest<'life2>,
) -> Pin<Box<dyn Future<Output = Result<AddonPrepareOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Downloads any required artifacts and produces the metadata patch and managed files to persist for this addon.
Sourcefn augment_launch<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_args: &'life1 mut AddonLaunchArgs,
_ctx: &'life2 AddonLaunchContext<'life3>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn augment_launch<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_args: &'life1 mut AddonLaunchArgs,
_ctx: &'life2 AddonLaunchContext<'life3>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Augments the launch command with dynamic JVM or game arguments before spawning.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".