Struct fluence_app_service::AppService
source · [−]pub struct AppService { /* private fields */ }
Implementations
sourceimpl AppService
impl AppService
sourcepub fn new<C, S>(
config: C,
service_id: S,
envs: HashMap<Vec<u8>, Vec<u8>>
) -> Result<Self, AppServiceError> where
C: TryInto<AppServiceConfig>,
S: Into<String>,
AppServiceError: From<C::Error>,
pub fn new<C, S>(
config: C,
service_id: S,
envs: HashMap<Vec<u8>, Vec<u8>>
) -> Result<Self, AppServiceError> where
C: TryInto<AppServiceConfig>,
S: Into<String>,
AppServiceError: From<C::Error>,
Create Service with given modules and service id.
sourcepub fn call<S: AsRef<str>>(
&mut self,
func_name: S,
arguments: JValue,
call_parameters: CallParameters
) -> Result<JValue, AppServiceError>
pub fn call<S: AsRef<str>>(
&mut self,
func_name: S,
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<S: AsRef<str>>(
&mut self,
func_name: S,
arguments: &[IValue],
call_parameters: CallParameters
) -> Result<Vec<IValue>, AppServiceError>
pub fn call_with_ivalues<S: AsRef<str>>(
&mut self,
func_name: S,
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.
Auto Trait Implementations
impl !RefUnwindSafe for AppService
impl Send for AppService
impl !Sync for AppService
impl Unpin for AppService
impl !UnwindSafe for AppService
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more