Struct red4ext_rs::types::Function
source · pub struct Function(/* private fields */);
Expand description
An RTTI representation of a function type.
Implementations§
source§impl Function
impl Function
pub fn name(&self) -> CName
pub fn short_name(&self) -> CName
pub fn flags(&self) -> FunctionFlags
pub fn set_flags(&mut self, flags: FunctionFlags)
pub fn parent(&self) -> Option<&Class>
pub fn locals(&self) -> &RedArray<&Property>
pub fn params(&self) -> &RedArray<&Property>
pub fn return_value(&self) -> Option<&Property>
pub fn add_param( &mut self, typ: CName, name: &CStr, is_out: bool, is_optional: bool, ) -> bool
pub fn set_return_type(&mut self, typ: CName)
sourcepub fn execute<A, R>(
&self,
ctx: Option<&IScriptable>,
args: A,
) -> Result<R, InvokeError>
pub fn execute<A, R>( &self, ctx: Option<&IScriptable>, args: A, ) -> Result<R, InvokeError>
Executes the function with the given arguments represented as a tuple of values
that satsify the NativeRepr
trait.
Returns the result of the function execution.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Function
impl !RefUnwindSafe for Function
impl !Send for Function
impl !Sync for Function
impl Unpin for Function
impl !UnwindSafe for Function
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