Browse Source

Move impls to the bottom

fix-bad-api-calls
Thomas Eizinger 3 years ago
parent
commit
c74f057254
No known key found for this signature in database GPG Key ID: 651AC83A6C6C8B96
  1. 28
      daemon/src/maker_inc_connections.rs

28
daemon/src/maker_inc_connections.rs

@ -10,10 +10,6 @@ use xtra::prelude::*;
pub struct BroadcastOrder(pub Option<Order>);
impl Message for BroadcastOrder {
type Result = ();
}
#[allow(clippy::large_enum_variant)]
pub enum TakerCommand {
SendOrder { order: Option<Order> },
@ -28,26 +24,16 @@ pub struct TakerMessage {
pub command: TakerCommand,
}
impl Message for TakerMessage {
type Result = ();
}
pub struct NewTakerOnline {
pub taker_id: TakerId,
pub out_msg_actor: Address<send_to_socket::Actor<wire::MakerToTaker>>,
}
impl Message for NewTakerOnline {
type Result = ();
}
pub struct Actor {
write_connections: HashMap<TakerId, Address<send_to_socket::Actor<wire::MakerToTaker>>>,
cfd_actor: Address<maker_cfd::Actor>,
}
impl xtra::Actor for Actor {}
impl Actor {
pub fn new(cfd_actor: Address<maker_cfd::Actor>) -> Self {
Self {
@ -144,3 +130,17 @@ impl Handler<NewTakerOnline> for Actor {
log_error!(self.handle_new_taker_online(msg));
}
}
impl Message for BroadcastOrder {
type Result = ();
}
impl Message for TakerMessage {
type Result = ();
}
impl Message for NewTakerOnline {
type Result = ();
}
impl xtra::Actor for Actor {}

Loading…
Cancel
Save