forked from lx/netapp
fix cargo fmt style
This commit is contained in:
parent
6c8dd95d20
commit
50806b54b7
2 changed files with 6 additions and 4 deletions
|
@ -27,9 +27,11 @@ type DynMsg = Box<dyn Any + Send + Sync + 'static>;
|
||||||
type OnConnectHandler = Box<dyn Fn(NodeID, SocketAddr, bool) + Send + Sync>;
|
type OnConnectHandler = Box<dyn Fn(NodeID, SocketAddr, bool) + Send + Sync>;
|
||||||
type OnDisconnectHandler = Box<dyn Fn(NodeID, bool) + Send + Sync>;
|
type OnDisconnectHandler = Box<dyn Fn(NodeID, bool) + Send + Sync>;
|
||||||
|
|
||||||
pub(crate) type LocalHandler = Box<dyn Fn(DynMsg) -> Pin<Box<dyn Future<Output = DynMsg> + Sync + Send>> + Sync + Send>;
|
pub(crate) type LocalHandler =
|
||||||
|
Box<dyn Fn(DynMsg) -> Pin<Box<dyn Future<Output = DynMsg> + Sync + Send>> + Sync + Send>;
|
||||||
pub(crate) type NetHandler = Box<
|
pub(crate) type NetHandler = Box<
|
||||||
dyn Fn(NodeID, Bytes) -> Pin<Box<dyn Future<Output = Vec<u8>> + Sync + Send>> + Sync + Send>;
|
dyn Fn(NodeID, Bytes) -> Pin<Box<dyn Future<Output = Vec<u8>> + Sync + Send>> + Sync + Send,
|
||||||
|
>;
|
||||||
|
|
||||||
pub(crate) struct Handler {
|
pub(crate) struct Handler {
|
||||||
pub(crate) local_handler: LocalHandler,
|
pub(crate) local_handler: LocalHandler,
|
||||||
|
|
Loading…
Reference in a new issue