Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rust/otap-dataflow/crates/engine/src/control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use std::time::{Duration, Instant};
/// A 8-byte context value. Supports conversion to and from plain data
/// using bytemuck.
#[repr(transparent)]
#[derive(Clone, Copy, Debug)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct Context8u8([u8; 8]);

impl<T: Pod> From<T> for Context8u8 {
Expand Down
6 changes: 6 additions & 0 deletions rust/otap-dataflow/crates/otap/src/accessory/slots.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ impl<UData> State<UData> {
Some((key, ures))
}

/// Get immutable reference to user data in a slot (if key is valid).
#[must_use]
pub fn get(&self, key: Key) -> Option<&UData> {
self.slots.get(key)
}

/// Modify user data in a slot (if key is valid).
#[must_use]
pub fn get_mut(&mut self, key: Key) -> Option<&mut UData> {
Expand Down
4 changes: 2 additions & 2 deletions rust/otap-dataflow/crates/otap/src/pdata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use otap_df_engine::{
use otap_df_pdata::OtapPayload;

/// Context for OTAP requests
#[derive(Clone, Debug, Default)]
#[derive(Clone, Debug, Default, PartialEq)]
pub struct Context {
stack: Vec<Frame>,
}
Expand Down Expand Up @@ -120,7 +120,7 @@ impl Context {
}

/// Per-node interests, context, and identity.
#[derive(Clone, Debug)]
#[derive(Clone, Debug, PartialEq)]
pub struct Frame {
/// Declares the set of interests this node has (Acks, Nacks, ...)
pub interests: Interests,
Expand Down
Loading
Loading