Skip to main content

ActionChain

Struct ActionChain 

Source
pub struct ActionChain { /* private fields */ }
Expand description

A sequence of actions with simple Vec foundation

Implementations§

Source§

impl ActionChain

Source

pub fn new(actions: Vec<Action>) -> Self

Create a new ActionChain from a vector of actions

Source

pub fn from_actions(actions: impl IntoIterator<Item = Action>) -> Self

Create a new ActionChain from any iterator of actions

Source

pub fn named(actions: Vec<Action>, name: impl Into<String>) -> Self

Create a new ActionChain with a name

Source

pub fn empty() -> Self

Create an empty ActionChain

Source

pub fn actions(&self) -> &[Action]

Get immutable reference to actions

Source

pub fn actions_mut(&mut self) -> &mut Vec<Action>

Get mutable reference to actions vector for direct manipulation

Source

pub fn push(&mut self, action: Action)

Add an action to the end of the chain

Source

pub fn extend(&mut self, actions: impl IntoIterator<Item = Action>)

Add multiple actions to the end of the chain

Source

pub fn insert(&mut self, index: usize, action: Action)

Insert an action at a specific index

Source

pub fn remove(&mut self, index: usize) -> Action

Remove and return the action at index

Source

pub fn pop(&mut self) -> Option<Action>

Remove the last action and return it

Source

pub fn clear(&mut self)

Clear all actions

Source

pub fn chain_with(self, other: ActionChain) -> Self

Create a new chain by appending another chain

Source

pub fn iter(&self) -> Iter<'_, Action>

Get an iterator over actions

Source

pub fn iter_mut(&mut self) -> IterMut<'_, Action>

Get a mutable iterator over actions

Source

pub fn name(&self) -> Option<&str>

Get the name of this chain

Source

pub fn set_name(&mut self, name: impl Into<String>)

Set the name of this chain

Source

pub fn len(&self) -> usize

Get the number of actions in this chain

Source

pub fn is_empty(&self) -> bool

Check if this chain is empty

Source

pub fn positioning_actions(&self) -> Vec<&Action>

Get actions that match a specific category

Source

pub fn read_actions(&self) -> Vec<&Action>

Source

pub fn control_actions(&self) -> Vec<&Action>

Source

pub fn involves_motor(&self) -> bool

Check if chain contains any motor movements

Source

pub fn involves_piezo(&self) -> bool

Check if chain contains any piezo movements

Source

pub fn modifies_bias(&self) -> bool

Check if chain contains any bias modifications

Source

pub fn summary(&self) -> String

Get a summary description of the chain

Source

pub fn analysis(&self) -> ChainAnalysis

Get detailed analysis of the chain

Source§

impl ActionChain

Source

pub fn system_status_check() -> Self

Comprehensive system status check

Source

pub fn safe_tip_approach() -> Self

Safe tip approach with verification

Source

pub fn move_and_approach(target: Position) -> Self

Move to position and approach

Source

pub fn bias_pulse_sequence(voltage: f32, duration_ms: u32) -> Self

Bias pulse sequence with restoration

Source

pub fn position_survey(positions: Vec<Position>) -> Self

Survey multiple positions

Source

pub fn tip_recovery_sequence() -> Self

Complete tip recovery sequence

Trait Implementations§

Source§

impl Clone for ActionChain

Source§

fn clone(&self) -> ActionChain

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ActionChain

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<ActionChain> for ActionRequest

Source§

fn from(chain: ActionChain) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<Action>> for ActionChain

Source§

fn from(actions: Vec<Action>) -> Self

Converts to this type from the input type.
Source§

impl FromIterator<Action> for ActionChain

Source§

fn from_iter<T: IntoIterator<Item = Action>>(iter: T) -> Self

Creates a value from an iterator. Read more
Source§

impl<'a> IntoIterator for &'a ActionChain

Source§

type Item = &'a Action

The type of the elements being iterated over.
Source§

type IntoIter = Iter<'a, Action>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl IntoIterator for ActionChain

Source§

type Item = Action

The type of the elements being iterated over.
Source§

type IntoIter = IntoIter<Action>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more

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.