Implement State::get
in pane_grid
This commit is contained in:
parent
f3d54a0f33
commit
c620e4dc4c
@ -82,6 +82,14 @@ impl<T> State<T> {
|
||||
/// Returns the internal state of the given [`Pane`], if it exists.
|
||||
///
|
||||
/// [`Pane`]: struct.Pane.html
|
||||
pub fn get(&self, pane: &Pane) -> Option<&T> {
|
||||
self.panes.get(pane)
|
||||
}
|
||||
|
||||
/// Returns the internal state of the given [`Pane`] with mutability, if it
|
||||
/// exists.
|
||||
///
|
||||
/// [`Pane`]: struct.Pane.html
|
||||
pub fn get_mut(&mut self, pane: &Pane) -> Option<&mut T> {
|
||||
self.panes.get_mut(pane)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user