pub struct FfiCtx<'a> {
pub func_name: &'a str,
pub vm_objs: &'a VMObjects,
pub user_data: Option<usize>,
pub stack: &'a mut Stack,
pub gcc: &'a GcContainer,
/* private fields */
}
Fields§
§func_name: &'a str
§vm_objs: &'a VMObjects
§user_data: Option<usize>
§stack: &'a mut Stack
§gcc: &'a GcContainer
Implementations§
source§impl<'a> FfiCtx<'a>
impl<'a> FfiCtx<'a>
pub fn new_nil(t: ValueType) -> GosValue
pub fn new_nil_slice(t_elem: ValueType) -> GosValue
pub fn new_uint_ptr(u: usize) -> GosValue
pub fn new_complex64(r: f32, i: f32) -> GosValue
pub fn new_function(f: FunctionKey) -> GosValue
pub fn new_package(p: PackageKey) -> GosValue
pub fn new_metadata(m: Meta) -> GosValue
pub fn new_complex128(r: f64, i: f64) -> GosValue
pub fn new_string(s: &str) -> GosValue
pub fn new_unsafe_ptr(p: Rc<dyn UnsafePtr>) -> GosValue
pub fn new_struct(&self, fields: Vec<GosValue, Global>) -> GosValue
pub fn new_array( &self, member: Vec<GosValue, Global>, t_elem: ValueType ) -> GosValue
pub fn new_primitive_array<T>( &self, member: Vec<T, Global>, t_elem: ValueType ) -> GosValuewhere T: CellData,
pub fn new_pointer(pointee: GosValue) -> GosValue
pub fn new_interface( underlying: GosValue, meta: Option<(Meta, Vec<Binding4Runtime, Global>)> ) -> GosValue
pub fn deref_pointer(&self, ptr: &GosValue) -> Result<GosValue, RuntimeError>
pub fn zero_val(&self, m: &Meta) -> GosValue
pub fn slice_as_rust_slice<T>( val: &GosValue ) -> Result<Ref<'_, [T]>, RuntimeError>where T: Element,
pub fn slice_as_primitive_slice<'b, C, D>( val: &'b GosValue ) -> Result<Ref<'b, [D]>, RuntimeError>where C: CellData + 'b, D: Copy,
pub fn array_as_rust_slice<T>(val: &GosValue) -> Ref<'_, [T]>where T: Element,
pub fn array_as_primitive_slice<'b, C, D>(val: &'b GosValue) -> Ref<'b, [D]>where C: CellData + 'b, D: Copy,
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for FfiCtx<'a>
impl<'a> !Send for FfiCtx<'a>
impl<'a> !Sync for FfiCtx<'a>
impl<'a> Unpin for FfiCtx<'a>
impl<'a> !UnwindSafe for FfiCtx<'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