Struct WindowsWindowHandleProbe
pub struct WindowsWindowHandleProbe<A = DefaultWindowsApi>where
A: WindowsApi,{
api: Arc<A>,
}Expand description
Window-handle probe backed by WindowsApi::get_window_handle_for_process.
Holds an Arc over a WindowsApi for the same testability reasons
as WindowsProcessSpawner.
Fields§
§api: Arc<A>Implementations§
Source§impl<A> WindowsWindowHandleProbe<A>where
A: WindowsApi,
impl<A> WindowsWindowHandleProbe<A>where
A: WindowsApi,
Sourcepub fn new(api: Arc<A>) -> WindowsWindowHandleProbe<A>
pub fn new(api: Arc<A>) -> WindowsWindowHandleProbe<A>
Construct a probe around a specific WindowsApi implementation.
§Arguments
api- Windows API operations implementation.
Trait Implementations§
Source§impl Default for WindowsWindowHandleProbe
impl Default for WindowsWindowHandleProbe
Source§fn default() -> WindowsWindowHandleProbe
fn default() -> WindowsWindowHandleProbe
Returns the “default value” for a type. Read more
Source§impl<A> WindowHandleProbe for WindowsWindowHandleProbe<A>where
A: WindowsApi + 'static,
impl<A> WindowHandleProbe for WindowsWindowHandleProbe<A>where
A: WindowsApi + 'static,
Source§type Handle = SendHwnd
type Handle = SendHwnd
Opaque platform-specific window handle type
(
HWND on Windows, X11 window XID, Wayland surface id, …).Source§fn window_handle_for_process(
&self,
pid: u32,
) -> Option<<WindowsWindowHandleProbe<A> as WindowHandleProbe>::Handle>
fn window_handle_for_process( &self, pid: u32, ) -> Option<<WindowsWindowHandleProbe<A> as WindowHandleProbe>::Handle>
Return a window handle owned by
pid, if one exists. Read moreAuto Trait Implementations§
impl<A> Freeze for WindowsWindowHandleProbe<A>
impl<A> RefUnwindSafe for WindowsWindowHandleProbe<A>where
A: RefUnwindSafe,
impl<A> Send for WindowsWindowHandleProbe<A>
impl<A> Sync for WindowsWindowHandleProbe<A>
impl<A> Unpin for WindowsWindowHandleProbe<A>
impl<A> UnsafeUnpin for WindowsWindowHandleProbe<A>
impl<A> UnwindSafe for WindowsWindowHandleProbe<A>where
A: RefUnwindSafe,
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.