pub struct Mod<T: 'static, B> { /* private fields */ }Implementations§
Source§impl<T: 'static, B> Mod<T, B>
impl<T: 'static, B> Mod<T, B>
pub fn start( host: &Host<T>, package: Package<T>, bind: Bind<T, B>, game: T, ) -> Self
pub fn call<R>( &mut self, f: impl FnOnce(&B, &mut Store<ModCtx<T>>) -> Result<R>, ) -> Result<Called<R>, ModError>
pub fn tick(&mut self)
pub fn swap( &mut self, host: &Host<T>, package: Package<T>, ) -> Result<(), ModError>
pub fn reload( &mut self, host: &Host<T>, package: Package<T>, ) -> Result<Swapped, ModError>
pub fn id(&self) -> &str
pub fn manifest(&self) -> &Manifest
pub fn fingerprint(&self) -> Fingerprint
pub fn running(&self) -> bool
pub fn stopped(&self) -> Option<&ModError>
pub fn fuel_left(&self) -> Option<u64>
pub fn game(&self) -> &T
pub fn game_mut(&mut self) -> &mut T
pub fn take_log(&mut self) -> Vec<String>
pub fn dropped_lines(&self) -> u64
Auto Trait Implementations§
impl<T, B> Freeze for Mod<T, B>
impl<T, B> !RefUnwindSafe for Mod<T, B>
impl<T, B> Send for Mod<T, B>
impl<T, B> Sync for Mod<T, B>
impl<T, B> Unpin for Mod<T, B>
impl<T, B> UnsafeUnpin for Mod<T, B>where
B: UnsafeUnpin,
T: UnsafeUnpin,
impl<T, B> !UnwindSafe for Mod<T, B>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more