pub struct Modules<T: 'static, B> { /* private fields */ }Implementations§
Source§impl<T: 'static, B> Modules<T, B>
impl<T: 'static, B> Modules<T, B>
pub fn open( host: Host<T>, bind: Bind<T, B>, files: impl IntoIterator<Item = (String, PathBuf)>, make: impl FnMut(&str) -> T + 'static, ) -> Self
pub fn tick(&mut self)
pub fn ticks(&self) -> u64
pub fn call<R>( &mut self, id: &str, f: impl FnOnce(&B, &mut Store<ModCtx<T>>) -> Result<R>, ) -> Option<Result<Called<R>, ModError>>
pub fn each<R>( &mut self, f: impl FnMut(&str, &B, &mut Store<ModCtx<T>>) -> Result<R>, ) -> Vec<(String, Called<R>)>
pub fn swap(&mut self, id: &str, bytes: Vec<u8>) -> bool
pub fn get(&self, id: &str) -> Option<&Mod<T, B>>
pub fn get_mut(&mut self, id: &str) -> Option<&mut Mod<T, B>>
pub fn running(&self, id: &str) -> bool
pub fn ids(&self) -> Vec<&str>
pub fn host(&self) -> &Host<T>
pub fn fingerprint(&self) -> Fingerprint
pub fn take_events(&mut self) -> Vec<Event>
Trait Implementations§
Auto Trait Implementations§
impl<T, B> Freeze for Modules<T, B>
impl<T, B> !RefUnwindSafe for Modules<T, B>
impl<T, B> !Send for Modules<T, B>
impl<T, B> !Sync for Modules<T, B>
impl<T, B> Unpin for Modules<T, B>
impl<T, B> UnsafeUnpin for Modules<T, B>
impl<T, B> !UnwindSafe for Modules<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