pub struct ComponentReg {
pub schema: HashMap<&'static str, AframeProperty>,
pub dependencies: Cow<'static, [Cow<'static, str>]>,
pub multiple: bool,
pub init: JsValue,
pub update: JsValue,
pub tick: JsValue,
pub tock: JsValue,
pub remove: JsValue,
pub pause: JsValue,
pub play: JsValue,
pub update_schema: JsValue,
}Expand description
Component registration definition. All JsValues should be derived from js_sys::Function
Fields§
§schema: HashMap<&'static str, AframeProperty>§dependencies: Cow<'static, [Cow<'static, str>]>§multiple: bool§init: JsValue§update: JsValue§tick: JsValue§tock: JsValue§remove: JsValue§pause: JsValue§play: JsValue§update_schema: JsValueImplementations§
Trait Implementations§
Source§impl Clone for ComponentReg
impl Clone for ComponentReg
Source§fn clone(&self) -> ComponentReg
fn clone(&self) -> ComponentReg
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for ComponentReg
impl Default for ComponentReg
Source§impl From<&ComponentReg> for JsValue
impl From<&ComponentReg> for JsValue
Source§fn from(cmr: &ComponentReg) -> Self
fn from(cmr: &ComponentReg) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ComponentReg
impl RefUnwindSafe for ComponentReg
impl Send for ComponentReg
impl Sync for ComponentReg
impl Unpin for ComponentReg
impl UnsafeUnpin for ComponentReg
impl UnwindSafe for ComponentReg
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
Source§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
Convert
self to a value of a Properties struct.Source§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
Source§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
Convert
self to a value of a Properties struct.Source§impl<S, T> Upcast<T> for S
impl<S, T> Upcast<T> for S
Source§impl<T> VectorRefIntoWasmAbi for T
impl<T> VectorRefIntoWasmAbi for T
Source§fn slice_into_abi(slice: &[T]) -> WasmSlice
fn slice_into_abi(slice: &[T]) -> WasmSlice
Construct the wire representation for
Some(slice). The returned
WasmSlice is either a borrow of the input slice (primitive
case) or a buffer JS owns and frees (handle-shaped case).Source§fn slice_none() -> WasmSlicewhere
Self: Sized,
fn slice_none() -> WasmSlicewhere
Self: Sized,
Wire representation for
None (used by Option<&[T]>). A null
WasmSlice (ptr == 0) is the convention shared with every
other vector-like ABI in the crate.