Struct Terminal

Source
pub struct Terminal<'a, E: Clone + Debug> { /* private fields */ }
Expand description

A place where a device can connect to another.

Implementations§

Source§

impl<E: Clone + Debug> Terminal<'_, E>

Source

pub const fn new_raw() -> Self

Direct constructor for a Terminal. You almost always actually want RefCell<Terminal> however, in which case you should call new, which returns RefCell<Terminal>.

Source

pub const fn new() -> RefCell<Self>

This constructs a RefCell<Terminal>. This is almost always what you want, and what is needed for connecting terminals. If you do just want a Terminal, use new_raw instead.

Source

pub fn disconnect(&mut self)

Disconnect this terminal and the one that it is connected to. You can connect terminals by calling the rrtk::connect function.

Trait Implementations§

Source§

impl<E: Clone + Debug> Getter<Command, E> for Terminal<'_, E>

Source§

fn get(&self) -> Output<Command, E>

Get something.
Source§

impl<E: Clone + Debug> Getter<State, E> for Terminal<'_, E>

Source§

fn get(&self) -> Output<State, E>

Get something.
Source§

impl<E: Clone + Debug> Getter<TerminalData, E> for Terminal<'_, E>

Source§

fn get(&self) -> Output<TerminalData, E>

Get something.
Source§

impl<E: Clone + Debug> Settable<Datum<Command>, E> for Terminal<'_, E>

Source§

fn set(&mut self, command: Datum<Command>) -> NothingOrError<E>

Set something to a value. For example, this could set a motor to a voltage.
Source§

impl<E: Clone + Debug> Settable<Datum<State>, E> for Terminal<'_, E>

Source§

fn set(&mut self, state: Datum<State>) -> NothingOrError<E>

Set something to a value. For example, this could set a motor to a voltage.
Source§

impl<E: Clone + Debug> Updatable<E> for Terminal<'_, E>

Source§

fn update(&mut self) -> NothingOrError<E>

This does not need to be called.

Auto Trait Implementations§

§

impl<'a, E> Freeze for Terminal<'a, E>

§

impl<'a, E> !RefUnwindSafe for Terminal<'a, E>

§

impl<'a, E> !Send for Terminal<'a, E>

§

impl<'a, E> !Sync for Terminal<'a, E>

§

impl<'a, E> Unpin for Terminal<'a, E>

§

impl<'a, E> !UnwindSafe for Terminal<'a, E>

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> 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, 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.