Trait gpui2::Entity

source ·
pub trait Entity<T>: Sealed {
    type Weak: 'static;

    // Required methods
    fn entity_id(&self) -> EntityId;
    fn downgrade(&self) -> Self::Weak;
    fn upgrade_from(weak: &Self::Weak) -> Option<Self>
       where Self: Sized;
}

Required Associated Types§

source

type Weak: 'static

Required Methods§

source

fn entity_id(&self) -> EntityId

source

fn downgrade(&self) -> Self::Weak

source

fn upgrade_from(weak: &Self::Weak) -> Option<Self>where Self: Sized,

Implementors§

source§

impl<T: 'static> Entity<T> for Model<T>

§

type Weak = WeakModel<T>

source§

impl<V: 'static> Entity<V> for View<V>

§

type Weak = WeakView<V>