Struct alewife::Builder [] [src]

pub struct Builder<Topic: Hash + Eq + Clone, Content: Clone> {
    // some fields omitted
}

Helper for building networks. Call build() to complete initialization.

Methods

impl<Topic: Hash + Eq + Clone, Content: Clone> Builder<Topic, Content>
[src]

fn add_subscriber(&mut self, topics: &[Topic]) -> Subscriber<Topic, Content>

Adds a subscriber to the network, with a complete list of the Topics it expects to receive. This list cannot be modified later.

fn build(self) -> Publisher<Topic, Content>

Finishes network setup. No more subscribers can be added after this.