Struct GCPluginConfig
pub struct GCPluginConfig(GCPluginConfig);Expand description
Zero cost abstraction over the GCPluginConfig ABI struct
Tuple Fields§
§0: GCPluginConfigImplementations§
§impl GCPluginConfig
impl GCPluginConfig
pub unsafe fn new(
own_datapoints: *const [GCDatapoint],
subscribed_datapoints: *const [GCDatapoint],
callbacks: *const sGCJsonCallbacks,
) -> Self
pub unsafe fn new( own_datapoints: *const [GCDatapoint], subscribed_datapoints: *const [GCDatapoint], callbacks: *const sGCJsonCallbacks, ) -> Self
Create a new GCPluginConfig
§Safety
The caller is responsible for ensuring the pointers are valid for the lifetime of the GCPluginConfig This also applies to own_datapoints and subscribed_datapoints!
pub fn get_own_datapoints(&self) -> &[GCDatapoint]
pub fn get_own_datapoints(&self) -> &[GCDatapoint]
Get the datapoints that the plugin is allowed to publish
pub fn get_subscribed_datapoints(&self) -> &[GCDatapoint]
pub fn get_subscribed_datapoints(&self) -> &[GCDatapoint]
Get the datapoints that the plugin is subscribed to
Trait Implementations§
§impl GCAbiConversion for GCPluginConfig
impl GCAbiConversion for GCPluginConfig
type CType = sPluginConfig
§fn from_c_ref(c_type: &Self::CType) -> &Self
fn from_c_ref(c_type: &Self::CType) -> &Self
Get a reference to the converted type
§unsafe fn from_c_ptr(ptr: *const Self::CType) -> &'static Self
unsafe fn from_c_ptr(ptr: *const Self::CType) -> &'static Self
Get a mutable reference to the C type Read more
§unsafe fn as_mut_ptr(&mut self) -> *mut Self::CType
unsafe fn as_mut_ptr(&mut self) -> *mut Self::CType
Get a mutable reference to the C type Read more
Auto Trait Implementations§
impl Freeze for GCPluginConfig
impl RefUnwindSafe for GCPluginConfig
impl !Send for GCPluginConfig
impl !Sync for GCPluginConfig
impl Unpin for GCPluginConfig
impl UnsafeUnpin for GCPluginConfig
impl UnwindSafe for GCPluginConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more