pub struct JsCompoundStateBuilder { /* private fields */ }Expand description
A builder for creating CompoundState instances from JavaScript.
The builder pattern is used here instead of Runtime Type Inferencing (downcasting) from generic
JavaScript objects because the latter required unsafe blocks or complex trait machinery that
is not well-supported by wasm-bindgen.
Implementations§
Source§impl JsCompoundStateBuilder
impl JsCompoundStateBuilder
pub fn new() -> Self
pub fn add_real_vector_state(&mut self, state: &JsRealVectorState)
pub fn add_so2_state(&mut self, state: &JsSO2State)
pub fn add_so3_state(&mut self, state: &JsSO3State)
pub fn add_se2_state(&mut self, state: &JsSE2State)
pub fn add_se3_state(&mut self, state: &JsSE3State)
pub fn add_compound_state(&mut self, state: &JsCompoundState)
pub fn build(self) -> JsCompoundState
Trait Implementations§
Source§impl Default for JsCompoundStateBuilder
impl Default for JsCompoundStateBuilder
Source§impl From<JsCompoundStateBuilder> for JsValue
impl From<JsCompoundStateBuilder> for JsValue
Source§fn from(value: JsCompoundStateBuilder) -> Self
fn from(value: JsCompoundStateBuilder) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for JsCompoundStateBuilder
impl FromWasmAbi for JsCompoundStateBuilder
Source§impl IntoWasmAbi for JsCompoundStateBuilder
impl IntoWasmAbi for JsCompoundStateBuilder
Source§impl RefFromWasmAbi for JsCompoundStateBuilder
impl RefFromWasmAbi for JsCompoundStateBuilder
Source§type Anchor = RcRef<JsCompoundStateBuilder>
type Anchor = RcRef<JsCompoundStateBuilder>
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.impl SupportsConstructor for JsCompoundStateBuilder
impl SupportsInstanceProperty for JsCompoundStateBuilder
impl SupportsStaticProperty for JsCompoundStateBuilder
Source§impl VectorFromWasmAbi for JsCompoundStateBuilder
impl VectorFromWasmAbi for JsCompoundStateBuilder
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[JsCompoundStateBuilder]>
Source§impl VectorIntoWasmAbi for JsCompoundStateBuilder
impl VectorIntoWasmAbi for JsCompoundStateBuilder
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[JsCompoundStateBuilder]>) -> Self::Abi
Source§impl WasmDescribeVector for JsCompoundStateBuilder
impl WasmDescribeVector for JsCompoundStateBuilder
Auto Trait Implementations§
impl !RefUnwindSafe for JsCompoundStateBuilder
impl !UnwindSafe for JsCompoundStateBuilder
impl Freeze for JsCompoundStateBuilder
impl Send for JsCompoundStateBuilder
impl Sync for JsCompoundStateBuilder
impl Unpin for JsCompoundStateBuilder
impl UnsafeUnpin for JsCompoundStateBuilder
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> 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::AbiSource§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.