#[derive(Message)]
#[rtype(result = "()")]
-pub struct SendAllMessage<Response> {
- pub op: UserOperation,
+pub struct SendAllMessage<OP: ToString, Response> {
+ pub op: OP,
pub response: Response,
pub websocket_id: Option<ConnectionId>,
}
#[derive(Message)]
#[rtype(result = "()")]
-pub struct SendUserRoomMessage<Response> {
- pub op: UserOperation,
+pub struct SendUserRoomMessage<OP: ToString, Response> {
+ pub op: OP,
pub response: Response,
pub local_recipient_id: LocalUserId,
pub websocket_id: Option<ConnectionId>,
#[derive(Message)]
#[rtype(result = "()")]
-pub struct SendCommunityRoomMessage<Response> {
- pub op: UserOperation,
+pub struct SendCommunityRoomMessage<OP: ToString, Response> {
+ pub op: OP,
pub response: Response,
pub community_id: CommunityId,
pub websocket_id: Option<ConnectionId>,
#[derive(Message)]
#[rtype(result = "()")]
-pub struct SendPost {
- pub op: UserOperation,
+pub struct SendPost<OP: ToString> {
+ pub op: OP,
pub post: PostResponse,
pub websocket_id: Option<ConnectionId>,
}
#[derive(Message)]
#[rtype(result = "()")]
-pub struct SendComment {
- pub op: UserOperation,
+pub struct SendComment<OP: ToString> {
+ pub op: OP,
pub comment: CommentResponse,
pub websocket_id: Option<ConnectionId>,
}