Struct logic_mesh::base::link::base::BaseLink

source ·
pub struct BaseLink<Tx> {
    pub id: Uuid,
    pub target_block_id: Uuid,
    pub target_input: String,
    pub tx: Option<Tx>,
    pub state: LinkState,
}
Expand description

Base Link that uses an abstract optional transmitter type Tx.

Links connect a block output to another block’s input. Or, a block input to another block’s input. A block output can have multiple links to multiple block inputs. A block input can have multiple links to multiple block inputs.

Fields§

§id: Uuid

Unique link id

§target_block_id: Uuid

The target block id

§target_input: String

The target input name

§tx: Option<Tx>

Optional transmitter type

§state: LinkState

The current link state

Implementations§

source§

impl<Tx> BaseLink<Tx>

source

pub fn new(target_block_id: Uuid, target_input: String) -> Self

Trait Implementations§

source§

impl<Tx: Clone> Clone for BaseLink<Tx>

source§

fn clone(&self) -> BaseLink<Tx>

Returns a copy 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<Tx: Debug> Debug for BaseLink<Tx>

source§

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

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

impl<Tx: Default> Default for BaseLink<Tx>

source§

fn default() -> BaseLink<Tx>

Returns the “default value” for a type. Read more
source§

fn id(&self) -> &Uuid

Unique link id
source§

fn target_block_id(&self) -> &Uuid

The id of the target block
source§

fn target_input(&self) -> &str

The name of the target input
source§

fn state(&self) -> LinkState

Current link state
source§

impl<Tx: PartialEq> PartialEq<BaseLink<Tx>> for BaseLink<Tx>

source§

fn eq(&self, other: &BaseLink<Tx>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<Tx> StructuralPartialEq for BaseLink<Tx>

Auto Trait Implementations§

§

impl<Tx> RefUnwindSafe for BaseLink<Tx>where Tx: RefUnwindSafe,

§

impl<Tx> Send for BaseLink<Tx>where Tx: Send,

§

impl<Tx> Sync for BaseLink<Tx>where Tx: Sync,

§

impl<Tx> Unpin for BaseLink<Tx>where Tx: Unpin,

§

impl<Tx> UnwindSafe for BaseLink<Tx>where Tx: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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 Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V