pub trait HelperService: Sized {
Show 14 methods
// Required methods
async fn route_add(
self,
context: Context,
subnet: String,
iface: String,
) -> Result<(), String>;
async fn route_remove(
self,
context: Context,
subnet: String,
) -> Result<(), String>;
async fn dns_install(
self,
context: Context,
domain: String,
port: u16,
) -> Result<(), String>;
async fn dns_uninstall(
self,
context: Context,
domain: String,
) -> Result<(), String>;
async fn dns_status(
self,
context: Context,
domain: String,
) -> Result<bool, String>;
async fn socket_link(
self,
context: Context,
target: String,
) -> Result<(), String>;
async fn socket_unlink(self, context: Context) -> Result<(), String>;
async fn cli_link(
self,
context: Context,
name: String,
target: String,
) -> Result<(), String>;
async fn cli_unlink(
self,
context: Context,
name: String,
) -> Result<(), String>;
async fn version(self, context: Context) -> String;
async fn hosts_alias_install(self, context: Context) -> Result<(), String>;
async fn hosts_alias_uninstall(self, context: Context) -> Result<(), String>;
async fn hosts_alias_status(self, context: Context) -> Result<bool, String>;
// Provided method
fn serve(self) -> ServeHelperService<Self> { ... }
}Expand description
The tarpc service definition for privileged host mutations.
All methods perform input validation server-side before executing any privileged operation. Results carry error strings on failure.
Required Methods§
Sourceasync fn route_add(
self,
context: Context,
subnet: String,
iface: String,
) -> Result<(), String>
async fn route_add( self, context: Context, subnet: String, iface: String, ) -> Result<(), String>
Adds a host route for subnet via iface.
Idempotent: returns Ok if the route already exists.
Sourceasync fn route_remove(
self,
context: Context,
subnet: String,
) -> Result<(), String>
async fn route_remove( self, context: Context, subnet: String, ) -> Result<(), String>
Removes the host route for subnet.
Idempotent: returns Ok if the route is already absent.
Sourceasync fn dns_install(
self,
context: Context,
domain: String,
port: u16,
) -> Result<(), String>
async fn dns_install( self, context: Context, domain: String, port: u16, ) -> Result<(), String>
Installs a DNS resolver file for domain pointing to 127.0.0.1:port.
Sourceasync fn dns_uninstall(
self,
context: Context,
domain: String,
) -> Result<(), String>
async fn dns_uninstall( self, context: Context, domain: String, ) -> Result<(), String>
Removes the DNS resolver file for domain.
Sourceasync fn dns_status(
self,
context: Context,
domain: String,
) -> Result<bool, String>
async fn dns_status( self, context: Context, domain: String, ) -> Result<bool, String>
Checks if a DNS resolver file is installed for domain.
Sourceasync fn socket_link(
self,
context: Context,
target: String,
) -> Result<(), String>
async fn socket_link( self, context: Context, target: String, ) -> Result<(), String>
Creates /var/run/docker.sock symlink pointing to target.
Sourceasync fn socket_unlink(self, context: Context) -> Result<(), String>
async fn socket_unlink(self, context: Context) -> Result<(), String>
Removes the /var/run/docker.sock symlink.
Sourceasync fn cli_link(
self,
context: Context,
name: String,
target: String,
) -> Result<(), String>
async fn cli_link( self, context: Context, name: String, target: String, ) -> Result<(), String>
Creates /usr/local/bin/{name} symlink pointing to target.
Used to expose Docker CLI tools from the app bundle.
Sourceasync fn cli_unlink(self, context: Context, name: String) -> Result<(), String>
async fn cli_unlink(self, context: Context, name: String) -> Result<(), String>
Removes /usr/local/bin/{name} symlink if it points inside an ArcBox bundle.
Sourceasync fn hosts_alias_install(self, context: Context) -> Result<(), String>
async fn hosts_alias_install(self, context: Context) -> Result<(), String>
Appends the fixed 127.0.0.1 ArcBox alias to /etc/hosts so the
guest-data NFS mount can use ArcBox:/ as its source (Finder shows
a mount by its source host name). Takes no arguments — the helper
never writes caller-controlled hosts entries.
Provided Methods§
Sourcefn serve(self) -> ServeHelperService<Self>
fn serve(self) -> ServeHelperService<Self>
Returns a serving function to use with InFlightRequest::execute.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".