pub struct WasmSession(/* private fields */);Expand description
Opaque handle to a decoded, steppable analysis session — the Session
enum itself can’t cross the boundary directly, since wasm_bindgen
requires an exported type to be a plain struct.
Implementations§
Source§impl WasmSession
impl WasmSession
Sourcepub fn advance(&mut self, step_budget: u32) -> Result<Ts<StepOutcome>, JsValue>
pub fn advance(&mut self, step_budget: u32) -> Result<Ts<StepOutcome>, JsValue>
See input_v1::Session::advance. Returns a { done, stageComplete, stepsTaken, loadFactor, error, recorderBatches } object — recorderBatches holds only the samples
this call produced (results-storage-indexeddb.md’s recorderBatch, one entry per
recorder that recorded this call), not the whole run’s history. There is no separate
“samples so far” accessor: a caller that needs the full history accumulates these
batches itself, same as the planned results-storage worker will.
Sourcepub fn modal_results(&self) -> Result<Ts<ModalResultsReport>, JsValue>
pub fn modal_results(&self) -> Result<Ts<ModalResultsReport>, JsValue>
Frequencies, mode shapes and participation of every Modal stage finished so far
({ stages: ModalStageResult[] }); empty until a modal stage completes. Read it after
advance reports done, or whenever a stage has completed.
Sourcepub fn current_stage_id(&self) -> Option<String>
pub fn current_stage_id(&self) -> Option<String>
The AnalysisSequence stage id advance is currently in (or, once
done, whichever stage stopped it) — undefined once every stage has
completed.
Trait Implementations§
Source§impl From<WasmSession> for JsValue
impl From<WasmSession> for JsValue
Source§fn from(value: WasmSession) -> Self
fn from(value: WasmSession) -> Self
Source§impl FromWasmAbi for WasmSession
impl FromWasmAbi for WasmSession
Source§impl IntoWasmAbi for WasmSession
impl IntoWasmAbi for WasmSession
Source§impl LongRefFromWasmAbi for WasmSession
impl LongRefFromWasmAbi for WasmSession
Source§type Abi = WasmPtr<WasmRefCell<WasmSession>>
type Abi = WasmPtr<WasmRefCell<WasmSession>>
RefFromWasmAbi::AbiSource§type Anchor = RcRef<WasmSession>
type Anchor = RcRef<WasmSession>
RefFromWasmAbi::AnchorSource§unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
RefFromWasmAbi::ref_from_abiSource§impl OptionFromWasmAbi for WasmSession
impl OptionFromWasmAbi for WasmSession
Source§impl OptionIntoWasmAbi for WasmSession
impl OptionIntoWasmAbi for WasmSession
Source§impl RefFromWasmAbi for WasmSession
impl RefFromWasmAbi for WasmSession
Source§type Abi = WasmPtr<WasmRefCell<WasmSession>>
type Abi = WasmPtr<WasmRefCell<WasmSession>>
Self are recovered from.Source§type Anchor = RcRef<WasmSession>
type Anchor = RcRef<WasmSession>
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 WasmSession
impl RefMutFromWasmAbi for WasmSession
Source§type Abi = WasmPtr<WasmRefCell<WasmSession>>
type Abi = WasmPtr<WasmRefCell<WasmSession>>
RefFromWasmAbi::AbiSource§type Anchor = RcRefMut<WasmSession>
type Anchor = RcRefMut<WasmSession>
RefFromWasmAbi::AnchorSource§unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
RefFromWasmAbi::ref_from_abiimpl SupportsConstructor for WasmSession
impl SupportsInstanceProperty for WasmSession
impl SupportsStaticProperty for WasmSession
Source§impl TryFromJsValue for WasmSession
impl TryFromJsValue for WasmSession
Source§impl VectorFromWasmAbi for WasmSession
impl VectorFromWasmAbi for WasmSession
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[WasmSession]>
Source§impl VectorIntoWasmAbi for WasmSession
impl VectorIntoWasmAbi for WasmSession
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[WasmSession]>) -> Self::Abi
Source§impl WasmDescribeVector for WasmSession
impl WasmDescribeVector for WasmSession
Auto Trait Implementations§
impl !Freeze for WasmSession
impl RefUnwindSafe for WasmSession
impl Send for WasmSession
impl Sync for WasmSession
impl Unpin for WasmSession
impl UnsafeUnpin for WasmSession
impl UnwindSafe for WasmSession
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
impl<T, U> Imply<T> for U
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
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.