#[repr(C)]pub struct PluginInfo {
pub supported_api: APIVersion,
pub name: *const c_char,
pub create_account: Option<extern "C" fn() -> Account>,
pub destroy_account: Option<extern "C" fn(acc: Account)>,
pub post_message: Option<extern "C" fn(msg: *const Message) -> SendStatus>,
pub print: Option<extern "C" fn(acc: Account)>,
}
Fields§
§supported_api: APIVersion
§name: *const c_char
§create_account: Option<extern "C" fn() -> Account>
§destroy_account: Option<extern "C" fn(acc: Account)>
§post_message: Option<extern "C" fn(msg: *const Message) -> SendStatus>
Instructs the plugin to post a message in the associated channel. The lifetime of msg is only guaranteed during the function call. To keep the message for longer (likely required), make a copy. TODO: Add way to update future message status as it is done async.
print: Option<extern "C" fn(acc: Account)>
Implementations§
Source§impl PluginInfo
impl PluginInfo
pub fn new() -> PluginInfo
Auto Trait Implementations§
impl Freeze for PluginInfo
impl RefUnwindSafe for PluginInfo
impl !Send for PluginInfo
impl !Sync for PluginInfo
impl Unpin for PluginInfo
impl UnwindSafe for PluginInfo
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