FunctionPointerObject

Struct FunctionPointerObject 

Source
pub struct FunctionPointerObject { /* private fields */ }

Implementations§

Source§

impl FunctionPointerObject

Source

pub fn create_function_pointer_objects_from_native_functions( functions: Vec<(FunctionMetadata, Function)>, ) -> HashMap<Box<str>, Self>

Source

pub fn new(metadata: &FunctionMetadata, func: Function) -> Self

Source

pub fn new_with_function_name(function_name: &str, func: Function) -> Self

Source

pub fn new_with_functions( this_object: OptionLangObjectRef, functions: &[InternalFunction], metadata: &FunctionMetadata, ) -> Result<Self, DataTypeConstraintError>

Source

pub fn copy_with_function_name(&self, function_name: &str) -> Self

Source

pub fn copy_with_function_info(&self, function_info: &str) -> Self

Source

pub fn copy_with_linker(&self, linker_function: bool) -> Self

Source

pub fn copy_with_deprecation_info(&self, deprecated: DeprecationInfo) -> Self

Source

pub fn copy_with_functions(&self, functions: &[InternalFunction]) -> Self

Source

pub fn copy_with_added_function(&self, function: InternalFunction) -> Self

Source

pub fn copy_with_added_functions(&self, function_pointer_object: &Self) -> Self

Source

pub fn copy_with_mapped_functions( &self, mapper: impl FnMut(&InternalFunction) -> InternalFunction, ) -> Self

Source

pub fn is_equals( &self, other: &Self, interpreter: &mut Interpreter, pos: CodePosition, ) -> bool

Source

pub fn is_strict_equals( &self, other: &Self, interpreter: &mut Interpreter, pos: CodePosition, ) -> bool

Source

pub fn this_object(&self) -> Option<&LangObjectRef>

Source

pub fn function_name(&self) -> Option<&str>

Source

pub fn function_info(&self) -> Option<&str>

Source

pub fn linker_function(&self) -> bool

Source

pub fn deprecated(&self) -> Option<&DeprecationInfo>

Source

pub fn functions(&self) -> &[InternalFunction]

Source

pub fn get_function(&self, index: usize) -> Option<&InternalFunction>

Source

pub fn get_overloaded_function_count(&self) -> usize

Trait Implementations§

Source§

impl Clone for FunctionPointerObject

Source§

fn clone(&self) -> FunctionPointerObject

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FunctionPointerObject

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for FunctionPointerObject

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for FunctionPointerObject

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Finalize for FunctionPointerObject

Source§

impl From<(&FunctionMetadata, Function)> for FunctionPointerObject

Source§

fn from((metadata, func): (&FunctionMetadata, Function)) -> Self

Converts to this type from the input type.
Source§

impl From<(FunctionMetadata, Function)> for FunctionPointerObject

Source§

fn from((metadata, func): (FunctionMetadata, Function)) -> Self

Converts to this type from the input type.
Source§

impl Trace for FunctionPointerObject

Source§

unsafe fn trace(&self)

Marks all contained Gcs.
Source§

unsafe fn root(&self)

Increments the root-count of all contained Gcs.
Source§

unsafe fn unroot(&self)

Decrements the root-count of all contained Gcs.
Source§

fn finalize_glue(&self)

Runs Finalize::finalize() on this object and all contained subobjects

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V