pub struct Rivers { /* private fields */ }Implementations§
Source§impl Rivers
impl Rivers
Sourcepub fn new(events: Vec<Event>) -> Self
pub fn new(events: Vec<Event>) -> Self
Examples found in repository?
examples/test.rs (line 16)
9async fn main() {
10 let events = vec![
11 Event::new(vec![0x1], vec![0x2]),
12 Event::new(vec![0x3], vec![0x4]),
13 Event::new(vec![0x5], vec![0x6]),
14 ];
15
16 let rivers = Rivers::new(events)
17 .stream("key and value", key_and_value_handler)
18 .stream("value only", value_handler);
19
20 rivers.run().await
21}Sourcepub fn stream<S, H, T>(self, topic: S, handler: H) -> Self
pub fn stream<S, H, T>(self, topic: S, handler: H) -> Self
Examples found in repository?
examples/test.rs (line 17)
9async fn main() {
10 let events = vec![
11 Event::new(vec![0x1], vec![0x2]),
12 Event::new(vec![0x3], vec![0x4]),
13 Event::new(vec![0x5], vec![0x6]),
14 ];
15
16 let rivers = Rivers::new(events)
17 .stream("key and value", key_and_value_handler)
18 .stream("value only", value_handler);
19
20 rivers.run().await
21}Sourcepub async fn run(self)
pub async fn run(self)
Examples found in repository?
examples/test.rs (line 20)
9async fn main() {
10 let events = vec![
11 Event::new(vec![0x1], vec![0x2]),
12 Event::new(vec![0x3], vec![0x4]),
13 Event::new(vec![0x5], vec![0x6]),
14 ];
15
16 let rivers = Rivers::new(events)
17 .stream("key and value", key_and_value_handler)
18 .stream("value only", value_handler);
19
20 rivers.run().await
21}Auto Trait Implementations§
impl Freeze for Rivers
impl !RefUnwindSafe for Rivers
impl Send for Rivers
impl Sync for Rivers
impl Unpin for Rivers
impl !UnwindSafe for Rivers
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