pub struct Consumer { /* private fields */ }Expand description
A simple Franz Consumer that receives messages from the broker
ⓘ
use franz_client::{Consumer, FranzClientError};
fn main() -> Result<(), FranzClientError> {
let mut consumer = Consumer::new("127.0.0.1:8085", "test", None)?;
let msg = consumer.recv()?;
Ok(println!("{}", String::from_utf8_lossy(&msg)))
}Implementations§
Auto Trait Implementations§
impl Freeze for Consumer
impl RefUnwindSafe for Consumer
impl Send for Consumer
impl Sync for Consumer
impl Unpin for Consumer
impl UnwindSafe for Consumer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more