pub struct WasmCoordinates { /* private fields */ }
Implementations§
Source§impl WasmCoordinates
impl WasmCoordinates
pub fn new(x: u32, y: u32) -> WasmCoordinates
pub fn x(&self) -> u32
pub fn y(&self) -> u32
pub fn is_origin(&self) -> bool
pub fn is_aligned_with(&self, other: &WasmCoordinates) -> bool
pub fn is_within(&self, origin: &WasmCoordinates, shape: &WasmShape) -> bool
pub fn offseted(&self, delta: &WasmDelta) -> WasmCoordinates
pub fn try_offseted(&self, delta: &WasmDelta) -> Option<WasmCoordinates>
pub fn to_delta(&self) -> WasmDelta
pub fn add_coordinates(&self, other: &WasmCoordinates) -> WasmCoordinates
pub fn sub_coordinates(&self, other: &WasmCoordinates) -> WasmCoordinates
pub fn add_shape(&self, shape: &WasmShape) -> WasmCoordinates
pub fn sub_shape(&self, shape: &WasmShape) -> WasmCoordinates
pub fn add_delta(&self, delta: &WasmDelta) -> Option<WasmCoordinates>
pub fn sub_delta(&self, delta: &WasmDelta) -> Option<WasmCoordinates>
pub fn bounding_box(coords: Vec<WasmCoordinates>) -> Option<Array>
Trait Implementations§
Source§impl Clone for WasmCoordinates
impl Clone for WasmCoordinates
Source§fn clone(&self) -> WasmCoordinates
fn clone(&self) -> WasmCoordinates
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for WasmCoordinates
impl Debug for WasmCoordinates
Source§impl From<WasmCoordinates> for JsValue
impl From<WasmCoordinates> for JsValue
Source§fn from(value: WasmCoordinates) -> Self
fn from(value: WasmCoordinates) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for WasmCoordinates
impl FromWasmAbi for WasmCoordinates
Source§impl IntoWasmAbi for WasmCoordinates
impl IntoWasmAbi for WasmCoordinates
Source§impl LongRefFromWasmAbi for WasmCoordinates
impl LongRefFromWasmAbi for WasmCoordinates
Source§impl OptionFromWasmAbi for WasmCoordinates
impl OptionFromWasmAbi for WasmCoordinates
Source§impl OptionIntoWasmAbi for WasmCoordinates
impl OptionIntoWasmAbi for WasmCoordinates
Source§impl PartialEq for WasmCoordinates
impl PartialEq for WasmCoordinates
Source§impl RefFromWasmAbi for WasmCoordinates
impl RefFromWasmAbi for WasmCoordinates
Source§type Anchor = RcRef<WasmCoordinates>
type Anchor = RcRef<WasmCoordinates>
The type that holds the reference to
Self
for the duration of the
invocation of the function that has an &Self
parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl RefMutFromWasmAbi for WasmCoordinates
impl RefMutFromWasmAbi for WasmCoordinates
Source§impl TryFromJsValue for WasmCoordinates
impl TryFromJsValue for WasmCoordinates
Source§impl VectorFromWasmAbi for WasmCoordinates
impl VectorFromWasmAbi for WasmCoordinates
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[WasmCoordinates]>
Source§impl VectorIntoJsValue for WasmCoordinates
impl VectorIntoJsValue for WasmCoordinates
fn vector_into_jsvalue(vector: Box<[WasmCoordinates]>) -> JsValue
Source§impl VectorIntoWasmAbi for WasmCoordinates
impl VectorIntoWasmAbi for WasmCoordinates
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[WasmCoordinates]>) -> Self::Abi
Source§impl WasmDescribeVector for WasmCoordinates
impl WasmDescribeVector for WasmCoordinates
Source§impl WasmWrapper<Coordinates> for WasmCoordinates
impl WasmWrapper<Coordinates> for WasmCoordinates
Source§fn from_inner(inner: Coordinates) -> Self
fn from_inner(inner: Coordinates) -> Self
Create a new wrapper from the inner type
Source§fn inner(&self) -> &Coordinates
fn inner(&self) -> &Coordinates
Get a reference to the inner type (Rust struct)
Source§fn into_inner(self) -> Coordinates
fn into_inner(self) -> Coordinates
Consume the wrapper and return the inner type
impl Eq for WasmCoordinates
impl StructuralPartialEq for WasmCoordinates
impl SupportsConstructor for WasmCoordinates
impl SupportsInstanceProperty for WasmCoordinates
impl SupportsStaticProperty for WasmCoordinates
Auto Trait Implementations§
impl Freeze for WasmCoordinates
impl RefUnwindSafe for WasmCoordinates
impl Send for WasmCoordinates
impl Sync for WasmCoordinates
impl Unpin for WasmCoordinates
impl UnwindSafe for WasmCoordinates
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::Abi
Source§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
.