Struct GCDatapoint
#[repr(transparent)]pub struct GCDatapoint(sGCDatapoint);Expand description
Safe zero cost abstraction over the [gc_abi_sys::GCDatapoint] This struct is meant to be initialized only by the gateway or another internal module.
Tuple Fields§
§0: sGCDatapointImplementations§
§impl GCDatapoint
impl GCDatapoint
pub fn new(id: u64, name: &str, description: &str, unit: &str) -> GCDatapoint
pub fn get_c_name(&self) -> &CStr
pub fn get_c_name(&self) -> &CStr
Get the CStr representation of the name
pub fn get_c_description(&self) -> &CStr
pub fn get_c_description(&self) -> &CStr
Get the CStr representation of the description
pub fn get_c_unit(&self) -> &CStr
pub fn get_c_unit(&self) -> &CStr
Get the CStr representation of the unit
pub fn get_description(&self) -> String
pub fn get_description(&self) -> String
Get the description as a native String
Trait Implementations§
§impl Debug for GCDatapoint
impl Debug for GCDatapoint
§impl GCAbiConversion for GCDatapoint
impl GCAbiConversion for GCDatapoint
type CType = sGCDatapoint
§fn from_c(c_type: <GCDatapoint as GCAbiConversion>::CType) -> GCDatapoint
fn from_c(c_type: <GCDatapoint as GCAbiConversion>::CType) -> GCDatapoint
Convert from the C type to the Rust type
§fn into_c(self) -> <GCDatapoint as GCAbiConversion>::CType
fn into_c(self) -> <GCDatapoint as GCAbiConversion>::CType
Convert from the Rust type to the C type
§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 GCDatapoint
impl RefUnwindSafe for GCDatapoint
impl !Send for GCDatapoint
impl !Sync for GCDatapoint
impl Unpin for GCDatapoint
impl UnsafeUnpin for GCDatapoint
impl UnwindSafe for GCDatapoint
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