pub struct Rect {
pub width: u32,
pub height: u32,
pub left: i32,
pub top: i32,
}Expand description
A node’s computed layout, returned by InkRoot::measure. Field set extends
ink’s measure result to left/top for useBoxMetrics (M3-J). left/top
are signed (negative margins can place a node outside its parent — matching
the core Rect’s signed x/y); width/
height are unsigned terminal cells.
Fields§
§width: u32§height: u32§left: i32§top: i32Trait Implementations§
Source§impl FromNapiValue for Rect
impl FromNapiValue for Rect
Source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Rect>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Rect>
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 Rect
impl ToNapiValue for Rect
Source§unsafe fn to_napi_value(env: napi_env, val: Rect) -> Result<napi_value>
unsafe fn to_napi_value(env: napi_env, val: Rect) -> 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 Rect
impl ValidateNapiValue for Rect
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 Rect
impl RefUnwindSafe for Rect
impl Send for Rect
impl Sync for Rect
impl Unpin for Rect
impl UnsafeUnpin for Rect
impl UnwindSafe for Rect
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