Struct fluence_app_service::AppService
source · pub struct AppService { /* private fields */ }
Implementations§
source§impl AppService
impl AppService
sourcepub fn new<C, S>(
config: C,
service_id: S,
envs: HashMap<Vec<u8>, Vec<u8>>
) -> Result<Self, AppServiceError>where
S: Into<String>,
C: TryInto<AppServiceConfig>,
AppServiceError: From<C::Error>,
pub fn new<C, S>( config: C, service_id: S, envs: HashMap<Vec<u8>, Vec<u8>> ) -> Result<Self, AppServiceError>where S: Into<String>, C: TryInto<AppServiceConfig>, AppServiceError: From<C::Error>,
Create Service with given modules and service id.
sourcepub fn call(
&mut self,
func_name: impl AsRef<str>,
arguments: JValue,
call_parameters: CallParameters
) -> Result<JValue, AppServiceError>
pub fn call( &mut self, func_name: impl AsRef<str>, arguments: JValue, call_parameters: CallParameters ) -> Result<JValue, AppServiceError>
Call a specified function of loaded module by its name with arguments in json format.
sourcepub fn call_with_ivalues(
&mut self,
func_name: impl AsRef<str>,
arguments: &[IValue],
call_parameters: CallParameters
) -> Result<Vec<IValue>, AppServiceError>
pub fn call_with_ivalues( &mut self, func_name: impl AsRef<str>, arguments: &[IValue], call_parameters: CallParameters ) -> Result<Vec<IValue>, AppServiceError>
Call a specified function of loaded module by its name with arguments in IValue format.
sourcepub fn get_interface(&self) -> ServiceInterface
pub fn get_interface(&self) -> ServiceInterface
Return interface (function signatures and record types) of this service.
sourcepub fn module_memory_stats(&self) -> MemoryStats<'_>
pub fn module_memory_stats(&self) -> MemoryStats<'_>
Return statistics of Wasm modules heap footprint. This operation is cheap.