Introduce more GPUI2 APIs needed for transitioning the workspace

This commit is contained in:
Antonio Scandurra 2023-11-02 10:53:28 +01:00
parent 8793300444
commit 32db64a049
7 changed files with 80 additions and 100 deletions

View file

@ -98,6 +98,10 @@ pub struct WeakView<V> {
}
impl<V: 'static> WeakView<V> {
pub fn entity_id(&self) -> EntityId {
self.model.entity_id
}
pub fn upgrade(&self) -> Option<View<V>> {
Entity::upgrade_from(self)
}