Struct DependencyDeclarator

Source
pub struct DependencyDeclarator<'a, 'x, S: ReactorInitializer> { /* private fields */ }
Expand description

Declares dependencies between components and reactions.

Implementations§

Source§

impl<S: ReactorInitializer> DependencyDeclarator<'_, '_, S>

Source

pub fn declare_triggers( &mut self, trigger: TriggerId, reaction: GlobalReactionId, ) -> AssemblyResult<()>

Source

pub fn effects_port<T: Sync>( &mut self, reaction: GlobalReactionId, port: &Port<T>, ) -> AssemblyResult<()>

Source

pub fn effects_multiport<T: Sync>( &mut self, reaction: GlobalReactionId, port: &Multiport<T>, ) -> AssemblyResult<()>

Source

pub fn declare_uses( &mut self, reaction: GlobalReactionId, trigger: TriggerId, ) -> AssemblyResult<()>

Source

pub fn bind_ports<T: Sync>( &mut self, upstream: &mut Port<T>, downstream: &mut Port<T>, ) -> AssemblyResult<()>

Bind two ports together.

Source

pub fn bind_ports_zip<'a, T: Sync + 'a>( &mut self, upstream: impl Iterator<Item = &'a mut Port<T>>, downstream: impl Iterator<Item = &'a mut Port<T>>, ) -> AssemblyResult<()>

Bind the ports of the upstream to those of the downstream, as if zipping both iterators. todo this will just throw away bindings if both iterators are not of the same size normally this should be reported by LFC as a warning, maybe we should implement the same thing here

Source

pub fn bind_ports_iterated<'a, T: Sync + 'a>( &mut self, upstream: impl Iterator<Item = &'a mut Port<T>>, downstream: impl Iterator<Item = &'a mut Port<T>>, ) -> AssemblyResult<()>

Auto Trait Implementations§

§

impl<'a, 'x, S> Freeze for DependencyDeclarator<'a, 'x, S>

§

impl<'a, 'x, S> !RefUnwindSafe for DependencyDeclarator<'a, 'x, S>

§

impl<'a, 'x, S> !Send for DependencyDeclarator<'a, 'x, S>

§

impl<'a, 'x, S> !Sync for DependencyDeclarator<'a, 'x, S>

§

impl<'a, 'x, S> Unpin for DependencyDeclarator<'a, 'x, S>

§

impl<'a, 'x, S> !UnwindSafe for DependencyDeclarator<'a, 'x, S>

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.