pub struct Finished { /* private fields */ }Expand description
A track whose producer finished it: its end is declared, and it can still take or serve an older group below that end, be read, or be aborted, but not append.
Dropping it releases this handle like dropping a Producer: once no clone is left, the
track leaves its broadcast’s listing as finished, so a new reader can no longer find it.
let _ = track.append_next();Implementations§
Source§impl Finished
impl Finished
Sourcepub fn requests(&self) -> Requests
pub fn requests(&self) -> Requests
Serve on-demand fetches of uncached groups below the end; see Producer::requests.
Sourcepub fn create_group(&self, frame: Frame) -> Result<Producer>
pub fn create_group(&self, frame: Frame) -> Result<Producer>
Create an older group below the end, which arrived late; see Producer::create_group.
A key at or past the end is refused with Error::Closed.
Sourcepub fn create_frame(&self, frame: Info) -> Result<Producer>
pub fn create_frame(&self, frame: Info) -> Result<Producer>
Self::create_group with its first frame streamed; see Producer::create_frame.
Sourcepub fn abort(self, err: Error) -> Result<()>
pub fn abort(self, err: Error) -> Result<()>
Abort the track with the given error; see Producer::abort.
Once every group below the end finished, readers still get the end the track declared: the
clean end after Producer::finish, or the error Producer::fail gave.
Sourcepub fn poll_closed(&self, waiter: &Waiter) -> Poll<Result<()>>
pub fn poll_closed(&self, waiter: &Waiter) -> Poll<Result<()>>
Resolves once the track’s outcome is final; see Producer::poll_closed.
Sourcepub async fn closed(&self) -> Result<()>
pub async fn closed(&self) -> Result<()>
Resolves once the track’s outcome is final; see Producer::poll_closed.
Awaits poll_closed.
Sourcepub fn subscribe(
&self,
subscription: impl Into<Option<Subscription>>,
) -> Subscriber
pub fn subscribe( &self, subscription: impl Into<Option<Subscription>>, ) -> Subscriber
Subscribe to this in-process track; see Producer::subscribe.