23 lines
438 B
Rust
Raw Normal View History

2020-09-28 15:40:27 +03:00
use fluence::fce;
fn main() {}
#[fce]
pub struct CallServiceResult {
2020-09-30 13:11:27 +03:00
pub ret_code: i32,
pub result: String,
2020-09-28 15:40:27 +03:00
}
#[fce]
2020-09-30 13:11:27 +03:00
pub fn call_service(service_id: String, fn_name: String, args: String) -> CallServiceResult {
2020-09-28 15:40:27 +03:00
println!(
"call service invoked with:\n service_id: {}\n fn_name: {}\n args: {:?}",
service_id, fn_name, args
);
CallServiceResult {
2020-09-30 13:11:27 +03:00
ret_code: 0,
result: args,
2020-09-28 15:40:27 +03:00
}
}