Module roles_logic_sv2::routing_logic
source · Expand description
The routing logic code is used by the handler to determine where a message should be relayed or responded to
TODO It seems like a good idea to hide all the traits to the user and export marker traits check if possible
-
CommonRouter -> implemented by routers used by the common (sub)protocol
-
MiningRouter -> implemented by routers used by the mining (sub)protocol
-
CommonRoutingLogic -> enum that define the enum the various routing logic for the common (sub)protocol (eg Proxy None …).
-
MiningProxyRoutingLogic -> enum that define the enum the various routing logic for the common (sub)protocol (eg Proxy None …).
-
NoRouting -> implement both CommonRouter and MiningRouter used when the routing logic needed is only None
-
MiningProxyRoutingLogic -> routing logic valid for a standard Sv2 mining proxy it is both a CommonRouter and a MiningRouter
Structs§
- Routing logic valid for a standard Sv2 proxy
- NoRouting Router used when
RoutingLogic::None
andMiningRoutingLogic::None
are needed. It implements bothCommonRouter
andMiningRouter
, and panics if used as an actual router. The only purpose ofNoRouting
is a marker trait for whenRoutingLogic::None
andMiningRoutingLogic::None
Enums§
- Enum that contains the possible routing logic is usually contructed before calling handle_message_..()
- Enum that contains the possibles routing logic is usually contructed before calling handle_message_..()
Traits§
- The CommonRouter trait defines a router needed by
crate::handlers::common::ParseUpstreamCommonMessages
andcrate::handlers::common::ParseDownstreamCommonMessages
- The MiningRouter trait defines a router needed by
crate::handlers::mining::ParseDownstreamMiningMessages
andcrate::handlers::mining::ParseUpstreamMiningMessages