pub struct ScratchSimulation { /* private fields */ }Implementations§
Source§impl ScratchSimulation
impl ScratchSimulation
pub fn new(config: JsValue) -> Result<ScratchSimulation, JsValue>
pub fn begin( &mut self, pointer_id: i32, angle_radians: f64, time_ms: f64, current_time: f64, rotation_degrees: f64, sample_rate: f64, duration: f64, ) -> Result<(), JsValue>
pub fn update( &mut self, pointer_id: i32, angle_radians: f64, time_ms: f64, duration: f64, sample_rate: f64, seconds_per_turn: f64, needle_lifted: bool, ) -> Result<JsValue, JsValue>
pub fn finish(&mut self)
pub fn map_physical_playback_rate(&self, playback_rate: f64) -> f64
pub fn plan_window( &self, center_sample_position: f64, frame_length: u32, window_frames: u32, current_window_start: u32, current_window_end: u32, margin_frames: u32, force: bool, ) -> Result<JsValue, JsValue>
Trait Implementations§
Source§impl From<ScratchSimulation> for JsValue
impl From<ScratchSimulation> for JsValue
Source§fn from(value: ScratchSimulation) -> Self
fn from(value: ScratchSimulation) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for ScratchSimulation
impl FromWasmAbi for ScratchSimulation
Source§impl IntoWasmAbi for ScratchSimulation
impl IntoWasmAbi for ScratchSimulation
Source§impl LongRefFromWasmAbi for ScratchSimulation
impl LongRefFromWasmAbi for ScratchSimulation
Source§type Abi = WasmPtr<WasmRefCell<ScratchSimulation>>
type Abi = WasmPtr<WasmRefCell<ScratchSimulation>>
Same as
RefFromWasmAbi::AbiSource§type Anchor = RcRef<ScratchSimulation>
type Anchor = RcRef<ScratchSimulation>
Same as
RefFromWasmAbi::AnchorSource§unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
Same as
RefFromWasmAbi::ref_from_abiSource§impl RefFromWasmAbi for ScratchSimulation
impl RefFromWasmAbi for ScratchSimulation
Source§type Abi = WasmPtr<WasmRefCell<ScratchSimulation>>
type Abi = WasmPtr<WasmRefCell<ScratchSimulation>>
The Wasm ABI type references to
Self are recovered from.Source§type Anchor = RcRef<ScratchSimulation>
type Anchor = RcRef<ScratchSimulation>
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 ScratchSimulation
impl RefMutFromWasmAbi for ScratchSimulation
Source§type Abi = WasmPtr<WasmRefCell<ScratchSimulation>>
type Abi = WasmPtr<WasmRefCell<ScratchSimulation>>
Same as
RefFromWasmAbi::AbiSource§type Anchor = RcRefMut<ScratchSimulation>
type Anchor = RcRefMut<ScratchSimulation>
Same as
RefFromWasmAbi::AnchorSource§unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
Same as
RefFromWasmAbi::ref_from_abiimpl SupportsConstructor for ScratchSimulation
impl SupportsInstanceProperty for ScratchSimulation
impl SupportsStaticProperty for ScratchSimulation
Source§impl TryFromJsValue for ScratchSimulation
impl TryFromJsValue for ScratchSimulation
Source§impl VectorFromWasmAbi for ScratchSimulation
impl VectorFromWasmAbi for ScratchSimulation
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[ScratchSimulation]>
Source§impl VectorIntoWasmAbi for ScratchSimulation
impl VectorIntoWasmAbi for ScratchSimulation
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[ScratchSimulation]>) -> Self::Abi
Source§impl WasmDescribeVector for ScratchSimulation
impl WasmDescribeVector for ScratchSimulation
Auto Trait Implementations§
impl Freeze for ScratchSimulation
impl RefUnwindSafe for ScratchSimulation
impl Send for ScratchSimulation
impl Sync for ScratchSimulation
impl Unpin for ScratchSimulation
impl UnsafeUnpin for ScratchSimulation
impl UnwindSafe for ScratchSimulation
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.