pub struct DependencyDeclarator<'a, 'x, S: ReactorInitializer> { /* private fields */ }Expand description
Declares dependencies between components and reactions.
Implementations§
Source§impl<S: ReactorInitializer> DependencyDeclarator<'_, '_, S>
impl<S: ReactorInitializer> DependencyDeclarator<'_, '_, S>
pub fn declare_triggers( &mut self, trigger: TriggerId, reaction: GlobalReactionId, ) -> AssemblyResult<()>
pub fn effects_port<T: Sync>( &mut self, reaction: GlobalReactionId, port: &Port<T>, ) -> AssemblyResult<()>
pub fn effects_multiport<T: Sync>( &mut self, reaction: GlobalReactionId, port: &Multiport<T>, ) -> AssemblyResult<()>
pub fn declare_uses( &mut self, reaction: GlobalReactionId, trigger: TriggerId, ) -> AssemblyResult<()>
Sourcepub fn bind_ports<T: Sync>(
&mut self,
upstream: &mut Port<T>,
downstream: &mut Port<T>,
) -> AssemblyResult<()>
pub fn bind_ports<T: Sync>( &mut self, upstream: &mut Port<T>, downstream: &mut Port<T>, ) -> AssemblyResult<()>
Bind two ports together.
Sourcepub 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<()>
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
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more