pub struct CompiledRuntime { /* private fields */ }Expand description
Wrapper struct for runtime after compilation
This wrapping is intended to make all changes to the internal state impossible that would break the compiled simulation (thus wrapping all the unsafety of code generation)
Implementations§
Source§impl CompiledRuntime
impl CompiledRuntime
pub fn join(self)
pub fn borrow_particle_mut( &self, particle_name: &str, ) -> Result<ParticleBorrowMut<'_>>
Sourcepub fn define_callback(
&mut self,
name: &str,
callback: CallbackType,
callback_state: CallbackStateType,
) -> Result<()>
pub fn define_callback( &mut self, name: &str, callback: CallbackType, callback_state: CallbackStateType, ) -> Result<()>
Define a new callback
Sourcepub fn undefine_callback(
&mut self,
name: &str,
) -> Result<(CallbackType, CallbackStateType)>
pub fn undefine_callback( &mut self, name: &str, ) -> Result<(CallbackType, CallbackStateType)>
Undefine an existing callback (to get its context back)
Sourcepub fn rebuild_neighbor_list(&mut self, interaction_name: &str) -> Result<()>
pub fn rebuild_neighbor_list(&mut self, interaction_name: &str) -> Result<()>
Manually rebuild the neighbor list for a given interaction
pub fn get_neighbor_lists( &mut self, interaction_name: &str, ) -> Result<HashMap<(ParticleID, Range<usize>), (Vec<usize>, Vec<usize>)>>
Auto Trait Implementations§
impl Freeze for CompiledRuntime
impl !RefUnwindSafe for CompiledRuntime
impl Send for CompiledRuntime
impl !Sync for CompiledRuntime
impl Unpin for CompiledRuntime
impl !UnwindSafe for CompiledRuntime
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