pub struct Dynamic { /* private fields */ }Expand description
Serves on-demand fetches of uncached (old) groups for a track, the group-level
analogue of broadcast::Dynamic.
Most tracks never serve old content, so this capability lives on a dedicated
handle rather than Producer: a relay creates one (via
Producer::dynamic or Request::dynamic) to pull past groups
from upstream. While at least one is alive the track will block a cache-miss
Consumer::fetch_group waiting to be served; with none, an accepted track’s
miss fails fast with Error::NotFound.
Implementations§
Source§impl Dynamic
impl Dynamic
Sourcepub async fn requested_group(&self) -> Result<GroupRequest>
pub async fn requested_group(&self) -> Result<GroupRequest>
Block until a consumer fetches a group that isn’t cached, returning a
GroupRequest to serve via GroupRequest::accept.
A relay issues a wire FETCH first; an origin already has the group cached, so the fetch resolves without ever reaching here. Errors once the track is aborted.
Sourcepub fn poll_requested_group(
&self,
waiter: &Waiter,
) -> Poll<Result<GroupRequest>>
pub fn poll_requested_group( &self, waiter: &Waiter, ) -> Poll<Result<GroupRequest>>
Poll counterpart to requested_group.
Sourcepub fn poll_unused(&self, waiter: &Waiter) -> Poll<()>
pub fn poll_unused(&self, waiter: &Waiter) -> Poll<()>
Poll for the track becoming unused (every consumer dropped).