pub struct Request { /* private fields */ }Expand description
A pending request for a broadcast to be served on demand.
Yielded by Dynamic::requested_broadcast. The requester is awaiting inside
Consumer::request_broadcast; accept resolves it with a live
broadcast (which the handler keeps producing into) and reject resolves
it with an error. Dropping the request without either rejects it.
Implementations§
Source§impl Request
impl Request
Sourcepub fn accept(self, broadcast: impl Consume<Consumer>)
pub fn accept(self, broadcast: impl Consume<Consumer>)
Accept the request, resolving every awaiting requester with broadcast.
The caller keeps producing into broadcast (e.g. a relay proxying tracks from
upstream); the requesters receive a consumer for it. Repeat requests for the
path share the served broadcast for as long as it stays live.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnsafeUnpin for Request
impl UnwindSafe for Request
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