Struct polychat_plugin::plugin::PluginInfo
source · [−]#[repr(C)]pub struct PluginInfo {
pub supported_api: APIVersion,
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: APIVersioncreate_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)>