Struct MaaImageBuffer

Source
pub struct MaaImageBuffer { /* private fields */ }

Implementations§

Source§

impl MaaImageBuffer

Source

pub fn new() -> Self

Source

pub fn empty(&self) -> bool

Source

pub fn clear(&self) -> MaaResult<()>

Source

pub fn get_raw(&self) -> *mut c_void

Source

pub fn width(&self) -> i32

Source

pub fn height(&self) -> i32

Source

pub fn typ(&self) -> i32

Source

pub fn encoded(&self) -> *mut u8

Source

pub fn encoded_size(&self) -> u64

Source

pub unsafe fn set_raw( &self, data: *mut c_void, width: i32, height: i32, typ: i32, )

§Safety

data must be a valid pointer to a valid encoded image

Source

pub unsafe fn set_encoded(&self, data: *mut u8, size: u64)

§Safety

data must be a valid pointer to a valid encoded image

Trait Implementations§

Source§

impl Default for MaaImageBuffer

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Drop for MaaImageBuffer

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl From<*mut MaaImageBuffer> for MaaImageBuffer

Source§

fn from(handle: MaaImageBufferHandle) -> Self

Converts to this type from the input type.
Source§

impl Send for MaaImageBuffer

Source§

impl Sync for MaaImageBuffer

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.