Skip to content

Commit

Permalink
Expose generation id
Browse files Browse the repository at this point in the history
  • Loading branch information
Aceeri committed May 29, 2017
1 parent 028c829 commit 8ca5368
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ impl Generation {
self.0 > 0
}

/// Returns the id of the generation.
#[inline]
pub fn get_id(&self) -> i32 {
self.0
}

/// Kills this `Generation`.
fn die(&mut self) {
debug_assert!(self.is_alive());
Expand Down

0 comments on commit 8ca5368

Please sign in to comment.