use crate::ffi;
use super::ffi_util;
raw_pod_rustlize!(
RawIndexSpec,
lgraph_api_index_spec_t,
lgraph_api_index_spec_destroy,
);
impl RawIndexSpec {
pub(crate) fn label(&self) -> String {
unsafe {
let cstr = ffi::lgraph_api_index_spec_get_label(self.inner);
ffi_util::from_cstr(cstr)
}
}
pub(crate) fn field(&self) -> String {
unsafe {
let cstr = ffi::lgraph_api_index_spec_get_field(self.inner);
ffi_util::from_cstr(cstr)
}
}
pub(crate) fn unique(&self) -> bool {
unsafe { ffi::lgraph_api_index_spec_get_unique(self.inner) }
}
}