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
18
use std::ffi::c_char;
use ustr::Ustr;

pub(crate) struct HandleString(Ustr);

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

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