BaseOutput

Struct BaseOutput 

Source
pub struct BaseOutput<L: Link> {
    pub value: Value,
    pub links: Vec<L>,
    pub block_id: Uuid,
    /* private fields */
}
Expand description

The base implementation of an output pin

Fields§

§value: Value§links: Vec<L>§block_id: Uuid

Implementations§

Source§

impl<L: Link> BaseOutput<L>

Source

pub fn new_named(name: &str, kind: HaystackKind, block_id: Uuid) -> Self

Creates a new output pin

§Arguments
  • name - The name of the output pin
  • kind - The haystack kind of the output pin
  • block_id - The block id of the block this output pin belongs to
§Returns

A new output pin

Source

pub fn new(kind: HaystackKind, block_id: Uuid) -> Self

Creates a new output pin with the name “out”

§Arguments
  • kind - The haystack kind of the output pin
  • block_id - The block id of the block this output pin belongs to
§Returns

A new output pin

Trait Implementations§

Source§

impl<L: Debug + Link> Debug for BaseOutput<L>

Source§

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

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

impl Output for BaseOutput<BaseLink<Sender<Value>>>

Source§

type Writer = <BaseInput<Receiver<Value>, Sender<Value>> as InputProps>::Writer

Adds a link to this output
Source§

fn set(&mut self, value: Value)

Set this output’s value by sending this value to all the registered links of this output.
Source§

impl<L: Link> OutputProps for BaseOutput<L>

The implementation of the OutputProps trait

Remove a link by id from this output

§Arguments
  • link_id: The id of the link to be removed
Source§

fn desc(&self) -> &OutDesc

The output’s description
Source§

fn block_id(&self) -> &Uuid

The block id of the block this output belongs to
Source§

fn value(&self) -> &Value

Get this output’s value
Source§

fn is_connected(&self) -> bool

True if this output is connected to at least one input
Get a list of links to this output
Remove all links to a specific block from this output
Remove all links from this output
Source§

fn name(&self) -> &str

The output’s name
Remove a link from this output Read more

Auto Trait Implementations§

§

impl<L> Freeze for BaseOutput<L>

§

impl<L> RefUnwindSafe for BaseOutput<L>
where L: RefUnwindSafe,

§

impl<L> Send for BaseOutput<L>
where L: Send,

§

impl<L> Sync for BaseOutput<L>
where L: Sync,

§

impl<L> Unpin for BaseOutput<L>
where L: Unpin,

§

impl<L> UnwindSafe for BaseOutput<L>
where L: UnwindSafe,

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

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

Source§

fn vzip(self) -> V