pub struct SpawnSource<'a> {
pub target_system: &'a TargetSystem,
pub target_planet: &'a TargetPlanet,
}
Fields§
§target_system: &'a TargetSystem
§target_planet: &'a TargetPlanet
Implementations§
Source§impl SpawnSource<'_>
impl SpawnSource<'_>
Sourcepub fn get_spawnable_species(&self) -> Vec<Species>
pub fn get_spawnable_species(&self) -> Vec<Species>
Returns a list of species that could spawn on this spawn source.
Sourcepub fn can_spawn_species(&self, species: &Species) -> bool
pub fn can_spawn_species(&self, species: &Species) -> bool
Checks if the given species can spawn on this spawn source.
Sourcepub fn satisfies_spawn_condition(&self, condition: &SpawnCondition<'_>) -> bool
pub fn satisfies_spawn_condition(&self, condition: &SpawnCondition<'_>) -> bool
Checks if the spawn source satisfies the given condition.
pub fn parent_stars(&self) -> impl Iterator<Item = &SpawnSourceStar>
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for SpawnSource<'a>
impl<'a> RefUnwindSafe for SpawnSource<'a>
impl<'a> Send for SpawnSource<'a>
impl<'a> Sync for SpawnSource<'a>
impl<'a> Unpin for SpawnSource<'a>
impl<'a> UnwindSafe for SpawnSource<'a>
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