@@ -2,6 +2,7 @@ use crate::Reason;
2
2
3
3
use super :: * ;
4
4
5
+ use std:: fmt;
5
6
use std:: task:: { Context , Waker } ;
6
7
use std:: time:: Instant ;
7
8
@@ -16,7 +17,6 @@ use std::time::Instant;
16
17
/// It's important to note that when the stream is placed in an internal queue
17
18
/// (such as an accept queue), this is **not** tracked by a reference count.
18
19
/// Thus, `ref_count` can be zero and the stream still has to be kept around.
19
- #[ derive( Debug ) ]
20
20
pub ( super ) struct Stream {
21
21
/// The h2 stream identifier
22
22
pub id : StreamId ,
@@ -391,6 +391,47 @@ impl Stream {
391
391
}
392
392
}
393
393
394
+ impl fmt:: Debug for Stream {
395
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
396
+ f. debug_struct ( "Stream" )
397
+ . field ( "id" , & self . id )
398
+ . field ( "state" , & self . state )
399
+ . field ( "is_counted" , & self . is_counted )
400
+ . field ( "ref_count" , & self . ref_count )
401
+ . field ( "next_pending_send" , & self . next_pending_send )
402
+ . field ( "is_pending_send" , & self . is_pending_send )
403
+ . field ( "send_flow" , & self . send_flow )
404
+ . field ( "requested_send_capacity" , & self . requested_send_capacity )
405
+ . field ( "buffered_send_data" , & self . buffered_send_data )
406
+ . field ( "send_task" , & self . send_task . as_ref ( ) . map ( |_| ( ) ) )
407
+ . field ( "pending_send" , & self . pending_send )
408
+ . field (
409
+ "next_pending_send_capacity" ,
410
+ & self . next_pending_send_capacity ,
411
+ )
412
+ . field ( "is_pending_send_capacity" , & self . is_pending_send_capacity )
413
+ . field ( "send_capacity_inc" , & self . send_capacity_inc )
414
+ . field ( "next_open" , & self . next_open )
415
+ . field ( "is_pending_open" , & self . is_pending_open )
416
+ . field ( "is_pending_push" , & self . is_pending_push )
417
+ . field ( "next_pending_accept" , & self . next_pending_accept )
418
+ . field ( "is_pending_accept" , & self . is_pending_accept )
419
+ . field ( "recv_flow" , & self . recv_flow )
420
+ . field ( "in_flight_recv_data" , & self . in_flight_recv_data )
421
+ . field ( "next_window_update" , & self . next_window_update )
422
+ . field ( "is_pending_window_update" , & self . is_pending_window_update )
423
+ . field ( "reset_at" , & self . reset_at )
424
+ . field ( "next_reset_expire" , & self . next_reset_expire )
425
+ . field ( "pending_recv" , & self . pending_recv )
426
+ . field ( "is_recv" , & self . is_recv )
427
+ . field ( "recv_task" , & self . recv_task . as_ref ( ) . map ( |_| ( ) ) )
428
+ . field ( "push_task" , & self . push_task . as_ref ( ) . map ( |_| ( ) ) )
429
+ . field ( "pending_push_promises" , & self . pending_push_promises )
430
+ . field ( "content_length" , & self . content_length )
431
+ . finish ( )
432
+ }
433
+ }
434
+
394
435
impl store:: Next for NextAccept {
395
436
fn next ( stream : & Stream ) -> Option < store:: Key > {
396
437
stream. next_pending_accept
0 commit comments