Skip to main content

GCPluginConfig

Struct GCPluginConfig 

pub struct GCPluginConfig(GCPluginConfig);
Expand description

Zero cost abstraction over the GCPluginConfig ABI struct

Tuple Fields§

§0: GCPluginConfig

Implementations§

§

impl GCPluginConfig

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]

Get the datapoints that the plugin is allowed to publish

pub fn get_subscribed_datapoints(&self) -> &[GCDatapoint]

Get the datapoints that the plugin is subscribed to

Trait Implementations§

§

impl GCAbiConversion for GCPluginConfig

§

type CType = sPluginConfig

§

fn from_c(c_type: Self::CType) -> Self

Convert from the C type to the Rust type
§

fn into_c(self) -> Self::CType

Convert from the Rust type to the C type
§

fn ref_c(&self) -> &Self::CType

Get a reference to the C type
§

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

Get a mutable reference to the C type Read more
§

unsafe fn as_ptr(&self) -> *const Self::CType

Get a immutable reference to the C type Read more
§

unsafe fn as_mut_ptr(&mut self) -> *mut Self::CType

Get a mutable reference to the C type Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.