pub struct ContentChannel { /* private fields */ }Expand description
The producing half of a ContentStream fed by a platform callback.
A backend that receives items from outside the composition — an Android enumeration callback, a drop target, a download — pushes into the channel and the pending collector future is woken. This is the replacement for every “drain what is ready each frame” contract.
Implementations§
Source§impl ContentChannel
impl ContentChannel
Sourcepub fn stream(&self) -> ContentStreamRef
pub fn stream(&self) -> ContentStreamRef
The consuming half, handed to the application.
Sourcepub fn push(&self, content: ContentHandle)
pub fn push(&self, content: ContentHandle)
Publishes one item and wakes a pending collector.
Sourcepub fn fail(&self, error: ContentError)
pub fn fail(&self, error: ContentError)
Ends the stream with an error and wakes a pending collector.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ContentChannel
impl !Send for ContentChannel
impl !Sync for ContentChannel
impl !UnwindSafe for ContentChannel
impl Freeze for ContentChannel
impl Unpin for ContentChannel
impl UnsafeUnpin for ContentChannel
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