Struct contained_actors::turing::Operator
source · pub struct Operator<S: Symbolic = String> { /* private fields */ }Trait Implementations§
source§impl<'de, S> Deserialize<'de> for Operator<S>where
S: Deserialize<'de> + Symbolic,
impl<'de, S> Deserialize<'de> for Operator<S>where S: Deserialize<'de> + Symbolic,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<S: Ord + Symbolic> Ord for Operator<S>
impl<S: Ord + Symbolic> Ord for Operator<S>
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<S: PartialEq + Symbolic> PartialEq<Operator<S>> for Operator<S>
impl<S: PartialEq + Symbolic> PartialEq<Operator<S>> for Operator<S>
source§impl<S: PartialOrd + Symbolic> PartialOrd<Operator<S>> for Operator<S>
impl<S: PartialOrd + Symbolic> PartialOrd<Operator<S>> for Operator<S>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl<S: Symbolic> Scope<S> for Operator<S>
impl<S: Symbolic> Scope<S> for Operator<S>
fn new(index: usize, state: State<States>, tape: Tape<S>) -> Self
fn insert(&mut self, elem: S)
fn position(&self) -> usize
fn set_position(&mut self, index: usize)
fn set_state(&mut self, state: State<States>)
fn set_symbol(&mut self, elem: S)
fn state(&self) -> &State<States>
fn tape(&self) -> &Tape<S>
fn build(tape: Tapes<S>) -> Selfwhere Self: Sized,
source§fn shift(&mut self, shift: Move, elem: S)
fn shift(&mut self, shift: Move, elem: S)
Move::Left inserts a new element at the start of the tape if the current position is 0
Move::Right inserts a new element at the end of the tape if the current position equals the total number of cells
Move::Stay does nothing
fn scope(&self) -> &S
impl<S: Eq + Symbolic> Eq for Operator<S>
impl<S: Symbolic> StructuralEq for Operator<S>
impl<S: Symbolic> StructuralPartialEq for Operator<S>
Auto Trait Implementations§
impl<S> RefUnwindSafe for Operator<S>where S: RefUnwindSafe,
impl<S> Send for Operator<S>where S: Send,
impl<S> Sync for Operator<S>where S: Sync,
impl<S> Unpin for Operator<S>where S: Unpin,
impl<S> UnwindSafe for Operator<S>where S: UnwindSafe,
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.