pub struct StylusCalibration { /* private fields */ }Implementations§
Source§impl StylusCalibration
impl StylusCalibration
pub fn new( total_samples: f64, anchors: JsValue, ) -> Result<StylusCalibration, JsValue>
pub fn from_programme_map( programme: JsValue, ) -> Result<StylusCalibration, JsValue>
pub fn has_gaps(&self) -> bool
pub fn total_samples(&self) -> f64
pub fn sample_to_groove(&self, sample: f64) -> f64
pub fn groove_to_sample(&self, groove: f64) -> f64
Source§impl StylusCalibration
impl StylusCalibration
Sourcepub fn from_programme_map_json_native(
value: &str,
) -> Result<StylusCalibration, String>
pub fn from_programme_map_json_native( value: &str, ) -> Result<StylusCalibration, String>
Creates the shared stylus calibration from a programme-map JSON object.
Trait Implementations§
Source§impl From<StylusCalibration> for JsValue
impl From<StylusCalibration> for JsValue
Source§fn from(value: StylusCalibration) -> Self
fn from(value: StylusCalibration) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for StylusCalibration
impl FromWasmAbi for StylusCalibration
Source§impl IntoWasmAbi for StylusCalibration
impl IntoWasmAbi for StylusCalibration
Source§impl LongRefFromWasmAbi for StylusCalibration
impl LongRefFromWasmAbi for StylusCalibration
Source§type Abi = WasmPtr<WasmRefCell<StylusCalibration>>
type Abi = WasmPtr<WasmRefCell<StylusCalibration>>
Same as
RefFromWasmAbi::AbiSource§type Anchor = RcRef<StylusCalibration>
type Anchor = RcRef<StylusCalibration>
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 StylusCalibration
impl RefFromWasmAbi for StylusCalibration
Source§type Abi = WasmPtr<WasmRefCell<StylusCalibration>>
type Abi = WasmPtr<WasmRefCell<StylusCalibration>>
The Wasm ABI type references to
Self are recovered from.Source§type Anchor = RcRef<StylusCalibration>
type Anchor = RcRef<StylusCalibration>
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 StylusCalibration
impl RefMutFromWasmAbi for StylusCalibration
Source§type Abi = WasmPtr<WasmRefCell<StylusCalibration>>
type Abi = WasmPtr<WasmRefCell<StylusCalibration>>
Same as
RefFromWasmAbi::AbiSource§type Anchor = RcRefMut<StylusCalibration>
type Anchor = RcRefMut<StylusCalibration>
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 StylusCalibration
impl SupportsInstanceProperty for StylusCalibration
impl SupportsStaticProperty for StylusCalibration
Source§impl TryFromJsValue for StylusCalibration
impl TryFromJsValue for StylusCalibration
Source§impl VectorFromWasmAbi for StylusCalibration
impl VectorFromWasmAbi for StylusCalibration
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[StylusCalibration]>
Source§impl VectorIntoWasmAbi for StylusCalibration
impl VectorIntoWasmAbi for StylusCalibration
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[StylusCalibration]>) -> Self::Abi
Source§impl WasmDescribeVector for StylusCalibration
impl WasmDescribeVector for StylusCalibration
Auto Trait Implementations§
impl Freeze for StylusCalibration
impl RefUnwindSafe for StylusCalibration
impl Send for StylusCalibration
impl Sync for StylusCalibration
impl Unpin for StylusCalibration
impl UnsafeUnpin for StylusCalibration
impl UnwindSafe for StylusCalibration
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.