rename ParticleParams => ParticleParameters

This commit is contained in:
folex 2020-12-25 15:48:26 +03:00
parent dac4faef51
commit 11d4af0dd2
3 changed files with 7 additions and 6 deletions

View File

@ -49,7 +49,7 @@ impl DerefMut for SendSafeFaaS {
} }
#[derive(Debug, Default, Clone)] #[derive(Debug, Default, Clone)]
pub struct ParticleParams { pub struct ParticleParameters {
pub init_user_id: String, pub init_user_id: String,
pub particle_id: String, pub particle_id: String,
} }
@ -60,7 +60,7 @@ pub struct AquamarineVM {
/// file name of the AIR interpreter .wasm /// file name of the AIR interpreter .wasm
wasm_filename: String, wasm_filename: String,
/// information about the particle that is being executed at the moment /// information about the particle that is being executed at the moment
current_particle: Arc<Mutex<ParticleParams>>, current_particle: Arc<Mutex<ParticleParameters>>,
} }
impl AquamarineVM { impl AquamarineVM {
@ -68,7 +68,7 @@ impl AquamarineVM {
pub fn new(config: AquamarineVMConfig) -> Result<Self> { pub fn new(config: AquamarineVMConfig) -> Result<Self> {
use AquamarineVMError::InvalidDataStorePath; use AquamarineVMError::InvalidDataStorePath;
let current_particle: Arc<Mutex<ParticleParams>> = <_>::default(); let current_particle: Arc<Mutex<ParticleParameters>> = <_>::default();
let call_service = config.call_service; let call_service = config.call_service;
let params = current_particle.clone(); let params = current_particle.clone();
let call_service_closure: HostExportedFunc = Box::new(move |_, ivalues: Vec<IValue>| { let call_service_closure: HostExportedFunc = Box::new(move |_, ivalues: Vec<IValue>| {

View File

@ -16,10 +16,11 @@
use std::path::PathBuf; use std::path::PathBuf;
use crate::aquamarine_stepper_vm::ParticleParams; use crate::aquamarine_stepper_vm::ParticleParameters;
use crate::IValue; use crate::IValue;
pub type CallServiceClosure = Box<dyn Fn(ParticleParams, Vec<IValue>) -> Option<IValue> + 'static>; pub type CallServiceClosure =
Box<dyn Fn(ParticleParameters, Vec<IValue>) -> Option<IValue> + 'static>;
/// Describes behaviour of the Aquamarine VM stepper. /// Describes behaviour of the Aquamarine VM stepper.
pub struct AquamarineVMConfig { pub struct AquamarineVMConfig {

View File

@ -29,7 +29,7 @@ mod config;
mod errors; mod errors;
pub use aquamarine_stepper_vm::AquamarineVM; pub use aquamarine_stepper_vm::AquamarineVM;
pub use aquamarine_stepper_vm::ParticleParams; pub use aquamarine_stepper_vm::ParticleParameters;
pub use config::CallServiceClosure; pub use config::CallServiceClosure;
pub use config::AquamarineVMConfig; pub use config::AquamarineVMConfig;
pub use errors::AquamarineVMError; pub use errors::AquamarineVMError;