Skip to main content

GCPluginInfo

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: sGCPluginInfo

Implementations§

§

impl GCPluginInfo

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

Create a new plugin info object from C strings

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

Get the version of the plugin as a Rust string

This method allocates a new 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_name(&self) -> &CStr

Get the name of the plugin as a C string

pub fn c_version(&self) -> &CStr

Get the version of the plugin as a C string

pub fn c_plugin_ifc_version(&self) -> &CStr

Get the plugin interface version of the plugin as a C string

pub fn features(&self) -> u64

Get the features of the plugin as a C string

Trait Implementations§

§

impl Clone for GCPluginInfo

§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Drop for GCPluginInfo

§

fn drop(&mut self)

Executes the destructor for this type. Read more
§

impl GCAbiConversion for GCPluginInfo

§

type CType = sGCPluginInfo

§

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
§

impl Send for GCPluginInfo

§

impl Sync for GCPluginInfo

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.