nsi-core 0.8.0

Nodal Scene Interface for (offline) 3D renderers – ɴsɪ.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::ffi::{c_char, CString};

pub(crate) struct HandleString(CString);

impl From<&str> for HandleString {
    #[inline(always)]
    fn from(handle: &str) -> Self {
        Self(CString::new(handle).unwrap())
    }
}

impl HandleString {
    #[inline(always)]
    pub(crate) fn as_char_ptr(&self) -> *const c_char {
        self.0.as_ptr()
    }
}