pub struct Galaxy { /* private fields */ }Implementations§
Source§impl Galaxy
impl Galaxy
Sourcepub fn new(config: GalaxyConfig, initial_tick: usize) -> Self
pub fn new(config: GalaxyConfig, initial_tick: usize) -> Self
Create a new Galaxy
Uses a custom configuration struct to set up all the details
Sourcepub fn get_details(
&mut self,
tick: usize,
coords: Coords,
structure: Option<StructureType>,
) -> Result<Details, String>
pub fn get_details( &mut self, tick: usize, coords: Coords, structure: Option<StructureType>, ) -> Result<Details, String>
Retrieve the details of a system, possibly scoped to a specific structure
Sourcepub fn get_config(&self) -> &GalaxyConfig
pub fn get_config(&self) -> &GalaxyConfig
Get a pointer to the Config
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Galaxy
impl RefUnwindSafe for Galaxy
impl Send for Galaxy
impl Sync for Galaxy
impl Unpin for Galaxy
impl UnsafeUnpin for Galaxy
impl UnwindSafe for Galaxy
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