Skip to content

Commit

Permalink
Update context.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
wtholliday committed Aug 20, 2023
1 parent 0cc8393 commit 4009aee
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ pub(crate) struct ContextId {
pub id: u64
}

impl ContextId {
pub fn view_id(self, path: &IdPath) -> ViewId {
with_context(self, |cx| cx.view_id(path))
}
}

/// The Context stores all UI state. A user of the library
/// shouldn't have to interact with it directly.
pub struct Context {
Expand Down

0 comments on commit 4009aee

Please sign in to comment.