File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 1+ //! Example showing how one could write to a file or socket instead of a string.
2+ //! For large metrics registries this will be more memory efficient.
3+
14use prometheus_client:: { encoding:: text:: encode, metrics:: counter:: Counter , registry:: Registry } ;
25use std:: io:: Write ;
36
4- /// Example showing how one could write to a file or socket instead of a string.
5- /// For large metrics registries this will be more memory efficient
67fn main ( ) {
78 let mut registry = <Registry >:: with_prefix ( "stream" ) ;
89 let request_counter: Counter < u64 > = Default :: default ( ) ;
@@ -23,9 +24,7 @@ fn main() {
2324 assert ! ( buf. as_bytes( ) == file) ;
2425}
2526
26- pub struct IoWriterWrapper < W > ( W )
27- where
28- W : Write ;
27+ pub struct IoWriterWrapper < W > ( W ) ;
2928
3029impl < W > std:: fmt:: Write for IoWriterWrapper < W >
3130where
You can’t perform that action at this time.
0 commit comments