@@ 28,58 28,6 @@ pub enum Either<A, B> {
Sad(B),
}
-/// Wrapper for a Directional [`Event`]
-#[derive(Clone, PartialEq, Eq, Debug, PartialOrd, Ord, Hash)]
-pub enum DirectionalEvent<I, O> {
- /// Incoming message, this node is the recipient
- Inbound(I),
- /// Outbound message, this node is the sender
- Outbound(O),
-}
-
-/// Wrapper for Directional [`Event`]'s flags
-#[derive(PartialEq, Eq, Debug, PartialOrd, Ord, Hash)]
-pub enum DirectionalEventFlags<I: Event, O: Event> {
- /// Incoming message, this node is the recipient
- Inbound(I::Flags),
- /// Outbound message, this node is the sender
- Outbound(O::Flags),
-}
-
-impl<I: Event, O: Event> Clone for DirectionalEventFlags<I, O> {
- fn clone(&self) -> Self {
- match self {
- Self::Inbound(arg0) => Self::Inbound(arg0.clone()),
- Self::Outbound(arg0) => Self::Outbound(arg0.clone()),
- }
- }
-}
-
-impl<I: Event, O: Event> Event for DirectionalEvent<I, O> {
- type Flags = DirectionalEventFlags<I, O>;
-
- fn flags(&self) -> Self::Flags {
- match self {
- DirectionalEvent::Inbound(e) => DirectionalEventFlags::Inbound(e.flags()),
- DirectionalEvent::Outbound(e) => DirectionalEventFlags::Outbound(e.flags()),
- }
- }
-
- fn stateless_clone(&self) -> Self {
- match self {
- DirectionalEvent::Inbound(e) => DirectionalEvent::Inbound(e.stateless_clone()),
- DirectionalEvent::Outbound(e) => DirectionalEvent::Outbound(e.stateless_clone()),
- }
- }
-
- fn token(&mut self) -> Option<CompletionToken> {
- match self {
- DirectionalEvent::Inbound(e) => e.token(),
- DirectionalEvent::Outbound(e) => e.token(),
- }
- }
-}
-
/// Token for listening for responses to requests
///
/// These tokens are always guaranteed, to have at most one equal counterpart, and they are