pub struct CursorPos {
pub x: u32,
pub y: u32,
}Expand description
A cursor position handed to InkRoot::set_cursor. Mirrors ink’s
CursorPosition (cursor-helpers.ts:3-6, {x, y}). None at the call site
mirrors setCursorPosition(undefined).
Fields§
§x: u32§y: u32Trait Implementations§
Source§impl FromNapiValue for CursorPos
impl FromNapiValue for CursorPos
Source§unsafe fn from_napi_value(
env: napi_env,
napi_val: napi_value,
) -> Result<CursorPos>
unsafe fn from_napi_value( env: napi_env, napi_val: napi_value, ) -> Result<CursorPos>
This function called to convert napi values to native rust values Read more
fn from_unknown(value: Unknown<'_>) -> Result<Self, Error>
Source§impl ToNapiValue for CursorPos
impl ToNapiValue for CursorPos
Source§unsafe fn to_napi_value(env: napi_env, val: CursorPos) -> Result<napi_value>
unsafe fn to_napi_value(env: napi_env, val: CursorPos) -> Result<napi_value>
This function called to convert rust values to napi values Read more
fn into_unknown(self, env: &Env) -> Result<Unknown<'_>, Error>
Source§impl ValidateNapiValue for CursorPos
impl ValidateNapiValue for CursorPos
Source§unsafe fn validate(
env: *mut napi_env__,
napi_val: *mut napi_value__,
) -> Result<*mut napi_value__, Error>
unsafe fn validate( env: *mut napi_env__, napi_val: *mut napi_value__, ) -> Result<*mut napi_value__, Error>
This function called to validate whether napi value passed to rust is valid type. Read more
Auto Trait Implementations§
impl Freeze for CursorPos
impl RefUnwindSafe for CursorPos
impl Send for CursorPos
impl Sync for CursorPos
impl Unpin for CursorPos
impl UnsafeUnpin for CursorPos
impl UnwindSafe for CursorPos
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