1+ use std:: fmt:: Debug ;
2+
13use hyper:: body:: Bytes ;
24use json:: Serialize ;
35use magicblock_core:: {
@@ -20,7 +22,7 @@ use crate::{
2022
2123/// An abstraction trait over types which specialize in turning various
2224/// websocket notification payload types into sequence of bytes
23- pub ( crate ) trait Encoder : Ord + Eq + Clone {
25+ pub ( crate ) trait Encoder : Ord + Eq + Clone + Debug {
2426 type Data ;
2527 fn encode (
2628 & self ,
@@ -64,7 +66,7 @@ impl From<UiAccountEncoding> for AccountEncoder {
6466}
6567
6668/// A `programSubscribe` payload encoder
67- #[ derive( PartialEq , PartialOrd , Ord , Eq , Clone ) ]
69+ #[ derive( PartialEq , PartialOrd , Ord , Eq , Clone , Debug ) ]
6870pub struct ProgramAccountEncoder {
6971 pub encoder : AccountEncoder ,
7072 pub filters : ProgramFilters ,
@@ -106,7 +108,7 @@ impl Encoder for ProgramAccountEncoder {
106108}
107109
108110/// A `signatureSubscribe` payload encoder
109- #[ derive( PartialEq , PartialOrd , Ord , Eq , Clone ) ]
111+ #[ derive( PartialEq , PartialOrd , Ord , Eq , Clone , Debug ) ]
110112pub ( crate ) struct TransactionResultEncoder ;
111113
112114impl Encoder for TransactionResultEncoder {
@@ -130,7 +132,7 @@ impl Encoder for TransactionResultEncoder {
130132}
131133
132134/// A `logsSubscribe` payload encoder
133- #[ derive( PartialEq , PartialOrd , Ord , Eq , Clone ) ]
135+ #[ derive( PartialEq , PartialOrd , Ord , Eq , Clone , Debug ) ]
134136pub ( crate ) enum TransactionLogsEncoder {
135137 All ,
136138 Mentions ( Pubkey ) ,
@@ -172,7 +174,7 @@ impl Encoder for TransactionLogsEncoder {
172174}
173175
174176/// A `slotSubscribe` payload encoder
175- #[ derive( PartialEq , PartialOrd , Ord , Eq , Clone ) ]
177+ #[ derive( PartialEq , PartialOrd , Ord , Eq , Clone , Debug ) ]
176178pub ( crate ) struct SlotEncoder ;
177179
178180impl Encoder for SlotEncoder {
0 commit comments