Trait sn_ffi_utils::SafePtr[][src]

pub trait SafePtr {
    type Ptr;
    fn as_safe_ptr(&self) -> *const Self::Ptr;
}
Expand description

Provides FFI-safe pointers, as opposed to raw as_ptr() in Vec and String which can return values such as 0x01 that can cause segmentation faults with the automatic pointer dereferencing on the front-end side (e.g. in Node.js).

Associated Types

Resulting pointer type.

Required methods

Returns a pointer that guarantees safe dereferencing on the front-end side.

Implementations on Foreign Types

Implementors