pub struct ScriptModuleCallHandle { /* private fields */ }Available on crate feature
module only.Expand description
関数の引数・返り値を扱うための型とトレイト。
Implementations§
Source§impl ScriptModuleCallHandle
impl ScriptModuleCallHandle
Sourcepub unsafe fn from_ptr(ptr: *mut SCRIPT_MODULE_PARAM) -> ScriptModuleCallHandle
pub unsafe fn from_ptr(ptr: *mut SCRIPT_MODULE_PARAM) -> ScriptModuleCallHandle
Sourcepub fn get_param<'a, T: FromScriptModuleParam<'a>>(
&'a self,
index: usize,
) -> Option<T>
pub fn get_param<'a, T: FromScriptModuleParam<'a>>( &'a self, index: usize, ) -> Option<T>
引数を取得する。
Sourcepub fn get_param_int(&self, index: usize) -> i32
pub fn get_param_int(&self, index: usize) -> i32
Sourcepub fn get_param_float(&self, index: usize) -> f64
pub fn get_param_float(&self, index: usize) -> f64
Sourcepub fn get_param_str(&self, index: usize) -> Option<String>
pub fn get_param_str(&self, index: usize) -> Option<String>
引数を文字列として取得する。
Sourcepub fn get_param_data<T>(&self, index: usize) -> Option<*mut T>
pub fn get_param_data<T>(&self, index: usize) -> Option<*mut T>
Sourcepub fn get_param_boolean(&self, index: usize) -> bool
pub fn get_param_boolean(&self, index: usize) -> bool
Sourcepub fn get_param_table_int(
&self,
index: usize,
key: &str,
) -> ScriptModuleCallHandleResult<i32>
pub fn get_param_table_int( &self, index: usize, key: &str, ) -> ScriptModuleCallHandleResult<i32>
Sourcepub fn get_param_table_float(
&self,
index: usize,
key: &str,
) -> ScriptModuleCallHandleResult<f64>
pub fn get_param_table_float( &self, index: usize, key: &str, ) -> ScriptModuleCallHandleResult<f64>
Sourcepub fn get_param_table_str(
&self,
index: usize,
key: &str,
) -> ScriptModuleCallHandleResult<Option<String>>
pub fn get_param_table_str( &self, index: usize, key: &str, ) -> ScriptModuleCallHandleResult<Option<String>>
引数のテーブルの要素を文字列として取得する。
Sourcepub fn get_param_array_len(&self, index: usize) -> usize
pub fn get_param_array_len(&self, index: usize) -> usize
引数の配列の要素の数を取得する。
Sourcepub fn get_param_array_int(&self, index: usize, array_index: usize) -> i32
pub fn get_param_array_int(&self, index: usize, array_index: usize) -> i32
引数の配列の要素を数値として取得する。
Sourcepub fn get_param_array_float(&self, index: usize, array_index: usize) -> f64
pub fn get_param_array_float(&self, index: usize, array_index: usize) -> f64
引数の配列の要素を浮動小数点数として取得する。
Sourcepub fn get_param_array_str(
&self,
index: usize,
array_index: usize,
) -> Option<String>
pub fn get_param_array_str( &self, index: usize, array_index: usize, ) -> Option<String>
引数の配列の要素を文字列として取得する。
Sourcepub fn set_error(&mut self, message: &str) -> ScriptModuleCallHandleResult<()>
pub fn set_error(&mut self, message: &str) -> ScriptModuleCallHandleResult<()>
関数のエラーを設定する。
Sourcepub fn push_result<T: IntoScriptModuleReturnValue>(
&mut self,
value: T,
) -> Result<(), IntoScriptModuleReturnValueError<T::Err>>
pub fn push_result<T: IntoScriptModuleReturnValue>( &mut self, value: T, ) -> Result<(), IntoScriptModuleReturnValueError<T::Err>>
関数の返り値を追加する。
Sourcepub fn push_result_int(&mut self, value: i32)
pub fn push_result_int(&mut self, value: i32)
関数の返り値に整数を追加する。
Sourcepub fn push_result_float(&mut self, value: f64)
pub fn push_result_float(&mut self, value: f64)
関数の返り値に浮動小数点数を追加する。
Sourcepub fn push_result_str(
&mut self,
value: &str,
) -> ScriptModuleCallHandleResult<()>
pub fn push_result_str( &mut self, value: &str, ) -> ScriptModuleCallHandleResult<()>
関数の返り値に文字列を追加する。
Sourcepub fn push_result_table_int<'a, T>(
&mut self,
table: T,
) -> ScriptModuleCallHandleResult<()>
pub fn push_result_table_int<'a, T>( &mut self, table: T, ) -> ScriptModuleCallHandleResult<()>
関数の返り値に整数の連想配列を追加する。
Sourcepub fn push_result_table_float<'a, T>(
&mut self,
table: T,
) -> ScriptModuleCallHandleResult<()>
pub fn push_result_table_float<'a, T>( &mut self, table: T, ) -> ScriptModuleCallHandleResult<()>
関数の返り値に浮動小数点数の連想配列を追加する。
Sourcepub fn push_result_table_str<'a, T>(
&mut self,
table: T,
) -> ScriptModuleCallHandleResult<()>
pub fn push_result_table_str<'a, T>( &mut self, table: T, ) -> ScriptModuleCallHandleResult<()>
関数の返り値に文字列の連想配列を追加する。
Sourcepub fn push_result_array_int(
&mut self,
values: &[i32],
) -> ScriptModuleCallHandleResult<()>
pub fn push_result_array_int( &mut self, values: &[i32], ) -> ScriptModuleCallHandleResult<()>
関数の返り値に整数の配列を追加する。
Sourcepub fn push_result_array_float(
&mut self,
values: &[f64],
) -> ScriptModuleCallHandleResult<()>
pub fn push_result_array_float( &mut self, values: &[f64], ) -> ScriptModuleCallHandleResult<()>
関数の返り値に浮動小数点数の配列を追加する。
Sourcepub fn push_result_array_str(
&mut self,
values: &[&str],
) -> ScriptModuleCallHandleResult<()>
pub fn push_result_array_str( &mut self, values: &[&str], ) -> ScriptModuleCallHandleResult<()>
関数の返り値に文字列の配列を追加する。
Sourcepub fn push_result_boolean(&mut self, value: bool)
pub fn push_result_boolean(&mut self, value: bool)
関数の返り値にブール値を追加する。
Trait Implementations§
Source§impl Debug for ScriptModuleCallHandle
impl Debug for ScriptModuleCallHandle
Source§impl From<*mut SCRIPT_MODULE_PARAM> for ScriptModuleCallHandle
impl From<*mut SCRIPT_MODULE_PARAM> for ScriptModuleCallHandle
Source§fn from(ptr: *mut SCRIPT_MODULE_PARAM) -> Self
fn from(ptr: *mut SCRIPT_MODULE_PARAM) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ScriptModuleCallHandle
impl RefUnwindSafe for ScriptModuleCallHandle
impl !Send for ScriptModuleCallHandle
impl !Sync for ScriptModuleCallHandle
impl Unpin for ScriptModuleCallHandle
impl UnwindSafe for ScriptModuleCallHandle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more