pub struct ControllerRef<'a> { /* private fields */ }Expand description
A borrowed reference to a Controller.
This is a non-owning view that can be used for read-only operations. It does NOT call destroy when dropped and should only be used while the underlying Controller is still alive.
Implementations§
Source§impl<'a> ControllerRef<'a>
impl<'a> ControllerRef<'a>
Sourcepub fn resolution(&self) -> MaaResult<(i32, i32)>
pub fn resolution(&self) -> MaaResult<(i32, i32)>
Get device resolution.
Sourcepub fn cached_image(&self) -> MaaResult<MaaImageBuffer>
pub fn cached_image(&self) -> MaaResult<MaaImageBuffer>
Get cached screenshot.
Sourcepub fn raw(&self) -> *mut MaaController
pub fn raw(&self) -> *mut MaaController
Get raw handle.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for ControllerRef<'a>
impl<'a> RefUnwindSafe for ControllerRef<'a>
impl<'a> !Send for ControllerRef<'a>
impl<'a> !Sync for ControllerRef<'a>
impl<'a> Unpin for ControllerRef<'a>
impl<'a> UnwindSafe for ControllerRef<'a>
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