pub struct ActionChannel<G, F, R> {
pub goals: Mutex<VecDeque<(ActionGoalId, G)>>,
pub acks: Mutex<HashMap<u64, GoalAck>>,
pub feedbacks: Mutex<HashMap<u64, VecDeque<ActionFeedback<F>>>>,
pub results: Mutex<HashMap<u64, ActionResult<R>>>,
pub cancels: Mutex<VecDeque<ActionGoalId>>,
pub statuses: Mutex<HashMap<u64, GoalStatus>>,
pub heartbeats: Mutex<HashMap<u64, Timestamp>>,
pub feedback_timestamps: Mutex<HashMap<u64, Timestamp>>,
pub result_timestamps: Mutex<HashMap<u64, Timestamp>>,
}Expand description
In-memory channel shared between a client and a server (same-process semantics).
Analogous to middleware_core::ServiceChannel: both sides hold an Arc to
the same instance; individual queues are protected by Mutex.
Fields§
§goals: Mutex<VecDeque<(ActionGoalId, G)>>Client → Server: pending goal queue.
acks: Mutex<HashMap<u64, GoalAck>>Server → Client: per-goal acknowledgement.
feedbacks: Mutex<HashMap<u64, VecDeque<ActionFeedback<F>>>>Server → Client: feedback queues keyed by goal id.
results: Mutex<HashMap<u64, ActionResult<R>>>Server → Client: per-goal final result.
cancels: Mutex<VecDeque<ActionGoalId>>Client → Server: cancel request queue.
statuses: Mutex<HashMap<u64, GoalStatus>>Current status per goal; readable by both client and server.
heartbeats: Mutex<HashMap<u64, Timestamp>>Last heartbeat timestamp per active goal.
feedback_timestamps: Mutex<HashMap<u64, Timestamp>>Last feedback timestamp per goal.
result_timestamps: Mutex<HashMap<u64, Timestamp>>Last terminal result timestamp per goal.
Implementations§
Auto Trait Implementations§
impl<G, F, R> !Freeze for ActionChannel<G, F, R>
impl<G, F, R> RefUnwindSafe for ActionChannel<G, F, R>
impl<G, F, R> Send for ActionChannel<G, F, R>
impl<G, F, R> Sync for ActionChannel<G, F, R>
impl<G, F, R> Unpin for ActionChannel<G, F, R>
impl<G, F, R> UnsafeUnpin for ActionChannel<G, F, R>
impl<G, F, R> UnwindSafe for ActionChannel<G, F, R>
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