Skip to content

Commit 6e4f67d

Browse files
committed
Documents the JoinLikeItem trait
1 parent 7882830 commit 6e4f67d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

server/swimos_agent/src/item.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,19 @@ pub trait MutableValueLikeItem<T> {
108108
fn set_handler<C: 'static>(projection: fn(&C) -> &Self, value: T) -> Self::SetHandler<C>;
109109
}
110110

111+
/// Trait for abstracting over common functionality between Join Map and Join Value lanes.
111112
pub trait JoinLikeItem<L> {
113+
/// Handler action for removing a downlink from a join lane.
112114
type RemoveDownlinkHandler<C>: HandlerAction<C, Completion = ()> + Send + 'static
113115
where
114116
C: 'static;
115117

118+
/// Create a handler that will remove a downlink from the lane and clear any entries in the
119+
/// underlying map.
120+
///
121+
/// # Arguments
122+
/// * `projection`: a projection to the join lane.
123+
/// * `link_key`: a key that signifies the downlink to remove.
116124
fn remove_downlink_handler<C: 'static>(
117125
projection: fn(&C) -> &Self,
118126
link_key: L,

0 commit comments

Comments
 (0)