pub struct Combinator<T: Clone> {
pub in_buffers: HashMap<ParticipantId, Queue<T>>,
pub tick_id_to_produce: TickId,
}
Fields§
§in_buffers: HashMap<ParticipantId, Queue<T>>
§tick_id_to_produce: TickId
Implementations§
Source§impl<T: Clone + Display> Combinator<T>
impl<T: Clone + Display> Combinator<T>
pub fn new(tick_id_to_produce: TickId) -> Self
pub fn create_buffer(&mut self, id: ParticipantId)
Sourcepub fn add(
&mut self,
id: ParticipantId,
tick_id: TickId,
step: T,
) -> Result<(), CombinatorError>
pub fn add( &mut self, id: ParticipantId, tick_id: TickId, step: T, ) -> Result<(), CombinatorError>
§Errors
CombinatorError
// TODO:
pub fn get_mut(&mut self, id: &ParticipantId) -> Option<&mut Queue<T>>
pub fn participants_that_can_provide(&self) -> (usize, usize)
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Combinator<T>
impl<T> RefUnwindSafe for Combinator<T>where
T: RefUnwindSafe,
impl<T> Send for Combinator<T>where
T: Send,
impl<T> Sync for Combinator<T>where
T: Sync,
impl<T> Unpin for Combinator<T>where
T: Unpin,
impl<T> UnwindSafe for Combinator<T>where
T: UnwindSafe,
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