pub struct InvocationInfo<'a> {
pub func_name: &'a str,
pub arg_names: &'a [&'a str],
pub arg_values: &'a [Box<dyn Any>],
pub return_type: TypeId,
pub return_value: Option<Box<dyn Any>>,
}
Expand description
Contains invocation arguments, including function signature and arguments
Fields§
§func_name: &'a str
Gets the name of the invoked function
arg_names: &'a [&'a str]
Array containig the name of input arguments
arg_values: &'a [Box<dyn Any>]
Array containing the values of the arguments as boxed dynamic value.
return_type: TypeId
Type id of the function result
return_value: Option<Box<dyn Any>>
The interceptor must set this value if the function has result
Implementations§
Source§impl<'a> InvocationInfo<'a>
impl<'a> InvocationInfo<'a>
pub fn set_return_value<T: 'static>(&mut self, val: T)
pub fn get_arg_value<T: 'static>(&self, index: usize) -> &T
pub fn get_arg_type(&self, index: usize) -> TypeId
Trait Implementations§
impl Send for InvocationInfo<'_>
Auto Trait Implementations§
impl<'a> Freeze for InvocationInfo<'a>
impl<'a> !RefUnwindSafe for InvocationInfo<'a>
impl<'a> !Sync for InvocationInfo<'a>
impl<'a> Unpin for InvocationInfo<'a>
impl<'a> !UnwindSafe for InvocationInfo<'a>
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