MCPcopy Create free account
hub / github.com/Axosoft/git-rs / dispatch

Function dispatch

gitrs_server/src/dispatch/dispatch.rs:7–22  ·  view source on GitHub ↗
(
    connection_state: state::Connection,
    message: message::protocol::Inbound,
)

Source from the content-addressed store, hash-verified

5use types::DispatchFuture;
6
7pub fn dispatch(
8 connection_state: state::Connection,
9 message: message::protocol::Inbound,
10) -> DispatchFuture {
11 use error::protocol::Error;
12 use error::protocol::InboundMessageError::Unexpected;
13 use message::protocol::Inbound;
14
15 match message {
16 Inbound::GitCommand(git_command) => git_command::dispatch(connection_state, git_command),
17 _ => Box::new(future::err((
18 Error::InboundMessage(Unexpected),
19 connection_state,
20 ))),
21 }
22}

Callers 1

init_dispatchFunction · 0.70

Calls 1

InboundMessageEnum · 0.85

Tested by

no test coverage detected