Struct extism_runtime::Function
source · pub struct Function { /* private fields */ }
Implementations§
source§impl Function
impl Function
pub fn new<F>( name: impl Into<String>, args: impl IntoIterator<Item = ValType>, returns: impl IntoIterator<Item = ValType>, user_data: Option<UserData>, f: F ) -> Functionwhere F: 'static + Fn(&mut Internal, &[Val], &mut [Val], UserData) -> Result<(), Error> + Sync + Send,
pub fn name(&self) -> &str
pub fn namespace(&self) -> Option<&str>
pub fn set_namespace(&mut self, namespace: impl Into<String>)
pub fn with_namespace(self, namespace: impl Into<String>) -> Self
pub fn ty(&self) -> &FuncType
Trait Implementations§
Auto Trait Implementations§
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
§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where T: AsFilelike,
Query the “status” flags for the
self
file descriptor.