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
Auto Trait Implementations§
impl Freeze for TextProcessContext
impl RefUnwindSafe for TextProcessContext
impl Send for TextProcessContext
impl Sync for TextProcessContext
impl Unpin for TextProcessContext
impl UnwindSafe for TextProcessContext
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