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

Method fill_buffer

examples/pulsar_processor_complex.rs:91–104  ·  view source on GitHub ↗
(&mut self, buffer_size: usize)

Source from the content-addressed store, hash-verified

89 async fn drain(&mut self, _buffer: VecDeque<ProcKafkaMessage>) {}
90
91 async fn fill_buffer(&mut self, buffer_size: usize) -> Result<VecDeque<ProcKafkaMessage>, Terminate> {
92
93 Ok((0..buffer_size)
94 .into_iter()
95 .map(|i| {
96 ProcKafkaMessage {
97 key: format!("{}", i).into_bytes(),
98 payload: format!("payload - {}", i),
99 topic: format!("topic1"),
100 partition: 1,
101 }
102 })
103 .collect::<VecDeque<ProcKafkaMessage>>())
104 }
105}
106
107

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected