Struct GCPluginInfo
#[repr(transparent)]pub struct GCPluginInfo(sGCPluginInfo);Expand description
A struct that represents the information of a plugin. This struct is meant to be initialized by the plugin and send to the gateway. It also the owner of the data it represents.
Tuple Fields§
§0: sGCPluginInfoImplementations§
§impl GCPluginInfo
impl GCPluginInfo
pub fn new(
name: &str,
version: &str,
plugin_ifc_version: &str,
features: u64,
) -> Self
pub fn new( name: &str, version: &str, plugin_ifc_version: &str, features: u64, ) -> Self
Create a new plugin info object
This creates 3 additional allocations
pub fn new_from_c(
name: CString,
version: CString,
plugin_ifc_version: CString,
features: u64,
) -> Self
pub fn new_from_c( name: CString, version: CString, plugin_ifc_version: CString, features: u64, ) -> Self
Create a new plugin info object from C strings
pub fn name(&self) -> String
pub fn name(&self) -> String
Get the name of the plugin as a Rust string
This method allocates a new string
pub fn version(&self) -> String
pub fn version(&self) -> String
Get the version of the plugin as a Rust string
This method allocates a new string
pub fn plugin_ifc_version(&self) -> String
pub fn plugin_ifc_version(&self) -> String
Get the plugin interface version of the plugin as a Rust string
This method allocates a new string
pub fn c_plugin_ifc_version(&self) -> &CStr
pub fn c_plugin_ifc_version(&self) -> &CStr
Get the plugin interface version of the plugin as a C string
Trait Implementations§
§impl Clone for GCPluginInfo
impl Clone for GCPluginInfo
§impl GCAbiConversion for GCPluginInfo
impl GCAbiConversion for GCPluginInfo
type CType = sGCPluginInfo
§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
impl Send for GCPluginInfo
impl Sync for GCPluginInfo
Auto Trait Implementations§
impl Freeze for GCPluginInfo
impl RefUnwindSafe for GCPluginInfo
impl Unpin for GCPluginInfo
impl UnsafeUnpin for GCPluginInfo
impl UnwindSafe for GCPluginInfo
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