MCPcopy Create free account
hub / github.com/Rustixir/tokio_sky / fill_buffer

Method fill_buffer

examples/kafka_processor_complex.rs:81–94  ·  view source on GitHub ↗
(&mut self, buffer_size: usize)

Source from the content-addressed store, hash-verified

79 async fn drain(&mut self, _buffer: VecDeque<ProcKafkaMessage>) {}
80
81 async fn fill_buffer(&mut self, buffer_size: usize) -> Result<VecDeque<ProcKafkaMessage>, Terminate> {
82
83 Ok((0..buffer_size)
84 .into_iter()
85 .map(|i| {
86 ProcKafkaMessage {
87 key: format!("{}", i).into_bytes(),
88 payload: format!("payload - {}", i),
89 topic: format!("topic1"),
90 partition: 1,
91 }
92 })
93 .collect::<VecDeque<ProcKafkaMessage>>())
94 }
95}
96
97

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected