#![doc(html_no_source)]
mod datapoint;
mod datapoint_value;
mod datapoint_value_quality;
pub mod error;
mod log;
mod plugin_config;
mod plugin_info;
mod plugin_interface;
pub mod raw;
pub use log::GCLogLevel;
pub type GCDatapointID = gc_abi_sys::GCDatapointIdentifier;
pub use datapoint::GCDatapoint;
pub use datapoint_value::{GCDatapointValue, GCDatapointValueType};
pub use datapoint_value_quality::GCDatapointValueQuality;
pub use plugin_config::GCPluginConfig;
pub use plugin_info::GCPluginInfo;
pub use plugin_interface::GCCoreExportedFunctions;
pub use plugin_interface::GCPluginInterface;
pub unsafe trait GCAbiConversion: Sized {
type CType: Sized;
fn from_c(c_type: Self::CType) -> Self;
fn into_c(self) -> Self::CType;
fn ref_c(&self) -> &Self::CType {
unsafe { &*(self as *const Self as *const Self::CType) }
}
fn from_c_ref(c_type: &Self::CType) -> &Self {
unsafe { &*(c_type as *const Self::CType as *const Self) }
}
unsafe fn from_c_ptr(ptr: *const Self::CType) -> &'static Self {
unsafe {
let result = ptr as *const Self;
&*result
}
}
unsafe fn as_ptr(&self) -> *const Self::CType {
self as *const Self as *mut Self::CType
}
unsafe fn as_mut_ptr(&mut self) -> *mut Self::CType {
self as *mut Self as *mut Self::CType
}
}