Struct ayaka_bindings_types::TextProcessContext
source · pub struct TextProcessContext {
pub game_props: HashMap<String, String>,
pub frontend: FrontendType,
}Expand description
The argument to text plugin.
ⓘ
use ayaka_bindings::*;
#[export]
fn plugin_type() -> PluginType {
PluginType::builder().text(&["hello"]).build()
}
#[export]
fn hello(_args: Vec<String>, _ctx: TextProcessContext) -> TextProcessResult {
let mut res = TextProcessResult::default();
res.line.push_back_chars("hello");
res
}Fields§
§game_props: HashMap<String, String>The global properties of the game profile.
frontend: FrontendTypeThe frontend type.
Trait Implementations§
source§impl Debug for TextProcessContext
impl Debug for TextProcessContext
source§impl<'de> Deserialize<'de> for TextProcessContext
impl<'de> Deserialize<'de> for TextProcessContext
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more