pub struct FunctionSet { /* private fields */ }Expand description
A collection of functions associated with a specific context type.
This type is used to construct and register a set of functions for a Context.
Once registered, these functions are referred to as methods within this crate,
and can be invoked from ActionScript via ExtensionContext.call.
Implementations§
Source§impl FunctionSet
impl FunctionSet
pub fn new() -> Self
pub fn with_capacity(capacity: usize) -> Self
Sourcepub fn add(
&mut self,
name: Option<UCStr>,
func_data: Option<impl Data>,
func: &FunctionDefinition,
)
pub fn add( &mut self, name: Option<UCStr>, func_data: Option<impl Data>, func: &FunctionDefinition, )
Adds a named function entry to the internal registry.
§Panics
Panics if a function with the same name has already been added.
Callers must ensure that each name is unique within this registry.
Trait Implementations§
Source§impl Debug for FunctionSet
impl Debug for FunctionSet
Auto Trait Implementations§
impl Freeze for FunctionSet
impl RefUnwindSafe for FunctionSet
impl !Send for FunctionSet
impl !Sync for FunctionSet
impl Unpin for FunctionSet
impl UnsafeUnpin for FunctionSet
impl UnwindSafe for FunctionSet
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