#[repr(C)]pub struct Function(pub *const c_void);Expand description
Describes a Function accessible from a Mun super::runtime::Runtime.
An instance of Function shares ownership of the underlying data. To create a copy of the
Function object call mun_function_add_reference to make sure the number of references to
the data is properly tracked. Calling mun_function_release signals the runtime that the data
is no longer referenced through the specified object. When all references are released the
underlying data is deallocated.
Tuple Fields§
§0: *const c_voidImplementations§
Source§impl Function
impl Function
Sourcepub unsafe fn inner(&self) -> Result<&FunctionDefinition, &'static str>
pub unsafe fn inner(&self) -> Result<&FunctionDefinition, &'static str>
Returns a reference to the data that this instance is referencing.
§Safety
The caller must ensure that the internal pointers point to a valid
mun_runtime::FunctionDefinition.
Trait Implementations§
Source§impl From<Arc<FunctionDefinition>> for Function
impl From<Arc<FunctionDefinition>> for Function
Source§fn from(def: Arc<FunctionDefinition>) -> Self
fn from(def: Arc<FunctionDefinition>) -> Self
Converts to this type from the input type.
impl Copy for Function
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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