pub struct MaaRectBuffer { /* private fields */ }Expand description
Rect buffer for passing rectangle coordinates between Rust and C API.
Stores x, y position and width, height dimensions.
Implementations§
Source§impl MaaRectBuffer
impl MaaRectBuffer
Sourcepub unsafe fn from_raw(handle: *mut MaaRect) -> Self
pub unsafe fn from_raw(handle: *mut MaaRect) -> Self
Create from an existing handle.
§Safety
This function assumes the handle is valid. The returned buffer will NOT take ownership of the handle (it won’t be destroyed on drop). Use this when you are borrowing a handle from the C API.
Sourcepub fn from_handle(handle: *mut MaaRect) -> Option<Self>
pub fn from_handle(handle: *mut MaaRect) -> Option<Self>
Create from an existing handle safely (checks for null).
Returns None if handle is null.
Trait Implementations§
Source§impl Debug for MaaRectBuffer
impl Debug for MaaRectBuffer
Source§impl Default for MaaRectBuffer
impl Default for MaaRectBuffer
Source§impl Drop for MaaRectBuffer
impl Drop for MaaRectBuffer
Source§impl From<&MaaRectBuffer> for Rect
impl From<&MaaRectBuffer> for Rect
Source§fn from(buf: &MaaRectBuffer) -> Self
fn from(buf: &MaaRectBuffer) -> Self
Converts to this type from the input type.
Source§impl From<MaaRectBuffer> for Rect
impl From<MaaRectBuffer> for Rect
Source§fn from(buf: MaaRectBuffer) -> Self
fn from(buf: MaaRectBuffer) -> Self
Converts to this type from the input type.
Source§impl From<Rect> for MaaRectBuffer
impl From<Rect> for MaaRectBuffer
impl Send for MaaRectBuffer
Auto Trait Implementations§
impl Freeze for MaaRectBuffer
impl RefUnwindSafe for MaaRectBuffer
impl !Sync for MaaRectBuffer
impl Unpin for MaaRectBuffer
impl UnwindSafe for MaaRectBuffer
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