pub struct ChannelSource { /* private fields */ }Expand description
A channel-based stream source.
Implementations§
Source§impl ChannelSource
impl ChannelSource
Sourcepub fn new(receiver: Receiver<StreamMessage>) -> Self
pub fn new(receiver: Receiver<StreamMessage>) -> Self
Create a new channel source.
Trait Implementations§
Source§impl StreamSource for ChannelSource
impl StreamSource for ChannelSource
Source§fn next<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Option<StreamMessage>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn next<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Option<StreamMessage>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Read the next element from the source.
Auto Trait Implementations§
impl Freeze for ChannelSource
impl RefUnwindSafe for ChannelSource
impl Send for ChannelSource
impl Sync for ChannelSource
impl Unpin for ChannelSource
impl UnsafeUnpin for ChannelSource
impl UnwindSafe for ChannelSource
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