AdiExpander

Struct AdiExpander 

Source
pub struct AdiExpander {
    pub port_a: AdiPort,
    pub port_b: AdiPort,
    pub port_c: AdiPort,
    pub port_d: AdiPort,
    pub port_e: AdiPort,
    pub port_f: AdiPort,
    pub port_g: AdiPort,
    pub port_h: AdiPort,
}
Expand description

A struct which represents a V5 ADI expander.

Fields§

§port_a: AdiPort

ADI Port 1 / A.

§port_b: AdiPort

ADI Port 2 / B.

§port_c: AdiPort

ADI Port 3 / C.

§port_d: AdiPort

ADI Port 4 / D.

§port_e: AdiPort

ADI Port 5 / E.

§port_f: AdiPort

ADI Port 6 / F.

§port_g: AdiPort

ADI Port 7 / G.

§port_h: AdiPort

ADI Port 8 / H.

Implementations§

Source§

impl AdiExpander

Source

pub unsafe fn new(smart_port: u8) -> Self

Initializes an ADI expander on a V5 Smart Port

§Safety

This function is unsafe because it allows the user to create multiple mutable references to the same ADI expander. You likely want to implement Robot::new() instead.

Trait Implementations§

Source§

impl From<SmartPort> for AdiExpander

Source§

fn from(port: SmartPort) -> Self

Converts to this type from the input type.

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