pub fn call(&self, args: &[&Value]) -> runtime::DMResult {
		let mut ret = raw_types::values::Value {
			tag: raw_types::values::ValueTag::Null,
			data: raw_types::values::ValueData { id: 0 },
		};

		unsafe {
			// Increment ref-count of args permenently before passing them on
			for v in args {
				raw_types::funcs::inc_ref_count(v.value);
			}

			let args: Vec<_> = args.iter().map(|e| e.value).collect();

			if raw_types::funcs::call_proc_by_id(
				&mut ret,
				Value::null().value,
				0,
				self.id,
				0,
				Value::null().value,
				args.as_ptr(),
				args.len(),
				0,
				0,
			) == 1
			{
				return Ok(Value::from_raw_owned(ret));
			}
		}

		Err(runtime!("External proc call failed"))
	}
/// Calls a global proc with the given arguments.
///
/// # Examples
///
/// This function is equivalent to `return do_explode(3)` in DM.
/// ```ignore
/// #[hook("/proc/my_proc")]
/// fn my_proc_hook() -> DMResult {
///     let proc = Proc::find("/proc/do_explode").unwrap();
///     proc.call(&[&Value::from(3.0)])
/// }
/// ```
Calls a global proc with the given arguments.
Calls a global proc with the given arguments .
pub fn call(&self, args: &[&Value]) -> runtime::DMResult {
		let mut ret = raw_types::values::Value {
			tag: raw_types::values::ValueTag::Null,
			data: raw_types::values::ValueData { id: 0 },
		};
		unsafe {
			// Increment ref-count of args permenently before passing them on
			for v in args {
				raw_types::funcs::inc_ref_count(v.value);
			}
			let args: Vec<_> = args.iter().map(|e| e.value).collect();
			if raw_types::funcs::call_proc_by_id(
				&mut ret,
				Value::null().value,
				0,
				self.id,
				0,
				Value::null().value,
				args.as_ptr(),
				args.len(),
				0,
				0,
			) == 1
			{
				return Ok(Value::from_raw_owned(ret));
			}
		}
		Err(runtime!("External proc call failed"))
	}
pub fn call ( & self , args : & [ & Value ] ) -> runtime :: DMResult { let mut ret = raw_types :: values :: Value { tag : raw_types :: values :: ValueTag :: Null , data : raw_types :: values :: ValueData { id : 0 } , } ; unsafe { // Increment ref-count of args permenently before passing them on for v in args { raw_types :: funcs :: inc_ref_count ( v . value ) ; } let args : Vec < _ > = args . iter ( ) . map ( | e | e . value ) . collect ( ) ; if raw_types :: funcs :: call_proc_by_id ( & mut ret , Value :: null ( ) . value , 0 , self . id , 0 , Value :: null ( ) . value , args . as_ptr ( ) , args . len ( ) , 0 , 0 , ) == 1 { return Ok ( Value :: from_raw_owned ( ret ) ) ; } } Err ( runtime ! ( " " ) ) }
Calls a global proc with the given arguments.
Calls a global proc with the given arguments .
&self
args
&[&Value]
examples
This function is equivalent to `return do_explode(3)` in DM.
```ignore
This function is equivalent to ` return do_explode ( 3 ) ` in DM . ` ` ` ignore
[hook("/proc/my_proc")]
None