Struct gpui2::WindowHandle
source · pub struct WindowHandle<V> { /* private fields */ }
Implementations§
source§impl<V: 'static + Render> WindowHandle<V>
impl<V: 'static + Render> WindowHandle<V>
pub fn new(id: WindowId) -> Self
pub fn root<C>(&self, cx: &mut C) -> Result<View<V>>where C: Context,
pub fn update<C, R>( &self, cx: &mut C, update: impl FnOnce(&mut V, &mut ViewContext<'_, V>) -> R ) -> Result<R>where C: Context,
pub fn read<'a>(&self, cx: &'a AppContext) -> Result<&'a V>
pub fn read_with<C, R>( &self, cx: &C, read_with: impl FnOnce(&V, &AppContext) -> R ) -> Result<R>where C: Context,
pub fn root_view<C>(&self, cx: &C) -> Result<View<V>>where C: Context,
pub fn is_active(&self, cx: &WindowContext<'_>) -> Option<bool>
Methods from Deref<Target = AnyWindowHandle>§
pub fn window_id(&self) -> WindowId
pub fn downcast<T: 'static>(&self) -> Option<WindowHandle<T>>
Trait Implementations§
source§impl<V> Clone for WindowHandle<V>
impl<V> Clone for WindowHandle<V>
source§impl<V> Deref for WindowHandle<V>
impl<V> Deref for WindowHandle<V>
source§impl<V> DerefMut for WindowHandle<V>
impl<V> DerefMut for WindowHandle<V>
source§impl<V> Hash for WindowHandle<V>
impl<V> Hash for WindowHandle<V>
source§impl<V: 'static> Into<AnyWindowHandle> for WindowHandle<V>
impl<V: 'static> Into<AnyWindowHandle> for WindowHandle<V>
source§fn into(self) -> AnyWindowHandle
fn into(self) -> AnyWindowHandle
Converts this type into the (usually inferred) input type.
source§impl<V> PartialEq<WindowHandle<V>> for WindowHandle<V>
impl<V> PartialEq<WindowHandle<V>> for WindowHandle<V>
impl<V> Copy for WindowHandle<V>
impl<V> Eq for WindowHandle<V>
Auto Trait Implementations§
impl<V> RefUnwindSafe for WindowHandle<V>where V: RefUnwindSafe,
impl<V> Send for WindowHandle<V>where V: Send,
impl<V> Sync for WindowHandle<V>where V: Sync,
impl<V> Unpin for WindowHandle<V>where V: Unpin,
impl<V> UnwindSafe for WindowHandle<V>where V: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.