pub struct Binding { /* private fields */ }Expand description
A held broadcast or the retained result of one eagerly issued broadcast request.
A pending request waits for a path nothing announces yet and rides out route churn until it
resolves (see follow). Once the
path is pinned, reading the binding answers that pin and never looks the path up again, even
after its publisher is replaced or goes. Issuing a request does not establish an identity
relationship with a separate catalog broadcast.
Build one with Source::bind, or with Binding::new for a broadcast already in hand.
Implementations§
Source§impl Binding
impl Binding
Sourcepub fn new(broadcast: Consumer) -> Self
pub fn new(broadcast: Consumer) -> Self
Bind to a broadcast already in hand, for a reference that named it.
Sourcepub fn poll_broadcast(&self, waiter: &Waiter) -> Poll<Result<Consumer>>
pub fn poll_broadcast(&self, waiter: &Waiter) -> Poll<Result<Consumer>>
The bound broadcast, once the origin answers.
Concurrent reads and cancelled waits retain the same request and result.
Sourcepub async fn broadcast(&self) -> Result<Consumer>
pub async fn broadcast(&self) -> Result<Consumer>
The bound broadcast, once the origin answers.
Concurrent reads and cancelled waits retain the same request and result.
Awaits poll_broadcast.