frontend: Add entries() API for Switch (#1358)

This commit is contained in:
Joshua Nelson
2020-01-20 08:29:05 -05:00
committed by Benjamin Bouvier
parent fd04ea2b06
commit 175b9641e0

View File

@@ -62,6 +62,11 @@ impl Switch {
); );
} }
/// Get a reference to all existing entries
pub fn entries(&self) -> &HashMap<EntryIndex, Ebb> {
&self.cases
}
/// Turn the `cases` `HashMap` into a list of `ContiguousCaseRange`s. /// Turn the `cases` `HashMap` into a list of `ContiguousCaseRange`s.
/// ///
/// # Postconditions /// # Postconditions