Skip to main content

ActionResult

Enum ActionResult 

Source
pub enum ActionResult {
    Value(f64),
    Values(Vec<f64>),
    Text(Vec<String>),
    Status(bool),
    Position(Position),
    OsciData(OsciData),
    Success,
    TCPReaderStatus(TCPReaderStatus),
    TipState(TipState),
    StabilityResult(StabilityResult),
    StableSignal(StableSignal),
    None,
}
Expand description

Simplified ActionResult with clear semantic separation

Variants§

§

Value(f64)

Single numeric value (signals, bias, etc.)

§

Values(Vec<f64>)

Multiple numeric values (signal arrays)

§

Text(Vec<String>)

String data (signal names, error messages, etc.)

§

Status(bool)

Boolean status (scanning/idle, running/stopped, etc.)

§

Position(Position)

Position data (meaningful x,y structure)

§

OsciData(OsciData)

Complex oscilloscope data (timing + data + metadata)

§

Success

Operation completed successfully (no data returned)

§

TCPReaderStatus(TCPReaderStatus)

TCP Logger status information

§

TipState(TipState)

Tip state determination result

§

StabilityResult(StabilityResult)

Detailed stability analysis result

§

StableSignal(StableSignal)

Stable signal value with analysis metadata

§

None

No result/waiting state

Implementations§

Source§

impl ActionResult

Source

pub fn as_f64(&self) -> Option<f64>

Convert to f64 if possible (for numerical results)

Source

pub fn as_bool(&self) -> Option<bool>

Convert to bool if possible (for status results)

Source

pub fn as_position(&self) -> Option<Position>

Convert to Position if possible

Source

pub fn as_osci_data(&self) -> Option<&OsciData>

Convert to OsciData if possible

Source

pub fn as_tip_shape(&self) -> Option<TipShape>

Convert to TipShape if possible

Source

pub fn as_tip_state(&self) -> Option<&TipState>

Convert to full TipState if possible

Source

pub fn as_stability_result(&self) -> Option<&StabilityResult>

Convert to StabilityResult if possible

Source

pub fn as_stable_signal_value(&self) -> Option<f32>

Convert to stable signal value if possible

Source

pub fn as_stable_signal(&self) -> Option<&StableSignal>

Convert to full StableSignal if possible

Source

pub fn expect_osci_data(self, action: &Action) -> OsciData

Extract OsciData with action validation (panics on type mismatch)

Source

pub fn expect_signal_value(self, action: &Action) -> f64

Extract signal value with action validation (panics on type mismatch)

Source

pub fn expect_values(self, action: &Action) -> Vec<f64>

Extract multiple values with action validation (panics on type mismatch)

Source

pub fn expect_position(self, action: &Action) -> Position

Extract position with action validation (panics on type mismatch)

Source

pub fn expect_bias_voltage(self, action: &Action) -> f32

Extract bias voltage with action validation (panics on type mismatch)

Source

pub fn expect_signal_names(self, action: &Action) -> Vec<String>

Extract signal names with action validation (panics on type mismatch)

Source

pub fn expect_status(self, action: &Action) -> bool

Extract status with action validation (panics on type mismatch)

Source

pub fn expect_tip_shape(self, action: &Action) -> TipShape

Extract tip shape enum with action validation (panics on type mismatch)

Source

pub fn expect_tip_state(self, action: &Action) -> TipState

Extract full tip state result with action validation (panics on type mismatch)

Source

pub fn expect_stability_result(self, action: &Action) -> StabilityResult

Extract stability result (panics on type mismatch)

Source

pub fn expect_stable_signal_value(self, action: &Action) -> f32

Extract stable signal value (panics on type mismatch)

Source

pub fn expect_stable_signal(self, action: &Action) -> StableSignal

Extract full stable signal result with action validation (panics on type mismatch)

Source

pub fn expect_tcp_reader_status(self, action: &Action) -> TCPReaderStatus

Extract TCP reader status with action validation (panics on type mismatch)

Source

pub fn try_into_osci_data(self, action: &Action) -> Result<OsciData, String>

Try to extract OsciData with action validation

Source

pub fn try_into_signal_value(self, action: &Action) -> Result<f64, String>

Try to extract signal value with action validation

Source

pub fn try_into_position(self, action: &Action) -> Result<Position, String>

Try to extract position with action validation

Source

pub fn try_into_status(self, action: &Action) -> Result<bool, String>

Try to extract status with action validation

Source

pub fn try_into_stability_result( self, action: &Action, ) -> Result<StabilityResult, String>

Try to extract stability result with action validation

Source

pub fn try_into_stable_signal_value( self, action: &Action, ) -> Result<f32, String>

Try to extract stable signal value with action validation

Trait Implementations§

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.