Struct ayaka_runtime::Context
source · pub struct Context<M: RawModule + Send + Sync + 'static> { /* private fields */ }
Expand description
The game running context.
Implementations§
source§impl<M: RawModule + Send + Sync + 'static> Context<M>
impl<M: RawModule + Send + Sync + 'static> Context<M>
sourcepub fn set_start_context(&mut self)
pub fn set_start_context(&mut self)
Initialize the RawContext
at the start of the game.
sourcepub fn set_context(&mut self, ctx: RawContext)
pub fn set_context(&mut self, ctx: RawContext)
Initialize the RawContext
with given record.
sourcepub fn get_action(&self, loc: &Locale, ctx: &RawContext) -> Result<Action>
pub fn get_action(&self, loc: &Locale, ctx: &RawContext) -> Result<Action>
Get the Action
from [Locale
] and RawContext
.
sourcepub fn next_run(&mut self) -> Option<RawContext>
pub fn next_run(&mut self) -> Option<RawContext>
Step to next line.
sourcepub fn current_paragraph_title(&self, loc: &Locale) -> Option<&String>
pub fn current_paragraph_title(&self, loc: &Locale) -> Option<&String>
Get current paragraph title.
Auto Trait Implementations§
impl<M> !RefUnwindSafe for Context<M>
impl<M> Send for Context<M>
impl<M> Sync for Context<M>
impl<M> Unpin for Context<M>
impl<M> !UnwindSafe for Context<M>
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