pub struct Hashlife { /* private fields */ }Implementations§
Source§impl Hashlife
impl Hashlife
pub fn next_generation(&mut self)
Sourcepub fn from_array(
buffer: Vec<u8>,
width: usize,
height: usize,
edge: Edge,
) -> Self
pub fn from_array( buffer: Vec<u8>, width: usize, height: usize, edge: Edge, ) -> Self
Construct a Hashlife program given an array of states.
pub fn get(&self, x: isize, y: isize) -> Option<Automata>
Sourcepub fn draw_diff_to_viewport_array(
&mut self,
buffer: &mut [u8],
viewport: BoundingBox,
)
pub fn draw_diff_to_viewport_array( &mut self, buffer: &mut [u8], viewport: BoundingBox, )
Draw automata that differes from the previous generation in the given array.
pub fn draw_to_viewport_buffer( &mut self, buffer: &mut [u8], viewport: BoundingBox, )
pub fn get_generation(&self) -> usize
Auto Trait Implementations§
impl Freeze for Hashlife
impl RefUnwindSafe for Hashlife
impl !Send for Hashlife
impl !Sync for Hashlife
impl Unpin for Hashlife
impl UnwindSafe for Hashlife
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