nodex-api 0.2.3

rust binding to node_api.h
Documentation
1
2
3
4
5
6
7
8
9
10
use std::ffi::CStr;
use std::mem::MaybeUninit;

use crate::{api, prelude::*};

impl NapiExtendedErrorInfo {
    pub fn error_message(&self) -> &str {
        unsafe { CStr::from_ptr(self.error_message).to_str().unwrap() }
    }
}