pub struct JvmAgentAddon { /* private fields */ }Expand description
Addon that injects a -javaagent and optional JVM arguments at launch time.
Implementations§
Source§impl JvmAgentAddon
impl JvmAgentAddon
Sourcepub fn new(
id: impl Into<Cow<'static, str>>,
name: impl Into<Cow<'static, str>>,
jar_path: impl Into<PathBuf>,
) -> Self
pub fn new( id: impl Into<Cow<'static, str>>, name: impl Into<Cow<'static, str>>, jar_path: impl Into<PathBuf>, ) -> Self
Creates a JVM agent addon injecting -javaagent:<jar_path> at launch time.
Sourcepub fn with_version(self, version: impl Into<String>) -> Self
pub fn with_version(self, version: impl Into<String>) -> Self
Sets the default version string recorded when the caller omits one.
Sourcepub fn with_agent_option(self, option: impl Into<String>) -> Self
pub fn with_agent_option(self, option: impl Into<String>) -> Self
Attaches an agent option string formatted as -javaagent:<jar_path>=<option>.
Sourcepub fn with_extra_jvm_arguments(self, args: Vec<String>) -> Self
pub fn with_extra_jvm_arguments(self, args: Vec<String>) -> Self
Appends additional JVM arguments injected alongside -javaagent.
Trait Implementations§
Source§impl Addon for JvmAgentAddon
impl Addon for JvmAgentAddon
Source§fn descriptor(&self) -> AddonDescriptor
fn descriptor(&self) -> AddonDescriptor
Returns the addon’s unique identifier and display name.
Source§fn patch_mode_support(&self) -> PatchModeSupport
fn patch_mode_support(&self) -> PatchModeSupport
Declares which patch modes this addon supports.
Source§fn 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.Source§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 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.
Source§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,
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.
Source§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 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.
Source§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 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.Source§fn 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.
Source§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 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.Source§impl Clone for JvmAgentAddon
impl Clone for JvmAgentAddon
Auto Trait Implementations§
impl Forget for JvmAgentAddon
impl Freeze for JvmAgentAddon
impl Move for JvmAgentAddon
impl RefUnwindSafe for JvmAgentAddonwhere
String: RefUnwindSafe,
impl Send for JvmAgentAddon
impl Sync for JvmAgentAddon
impl Unpin for JvmAgentAddon
impl UnsafeUnpin for JvmAgentAddonwhere
&'static str: UnsafeUnpin,
String: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
impl UnwindSafe for JvmAgentAddon
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more