pub struct SourceRefHandle<T: Send + 'static> {
pub id: u64,
/* private fields */
}Expand description
Producer-side advertisement of a Source<T>. The owner pumps
elements; consumers subscribe via SourceRefHandle::take_source.
Fields§
§id: u64Globally-unique stream ref id (unique per node).
Implementations§
Source§impl<T: Send + 'static> SourceRefHandle<T>
impl<T: Send + 'static> SourceRefHandle<T>
Sourcepub fn advertise(source: Source<T>, buffer: usize) -> Self
pub fn advertise(source: Source<T>, buffer: usize) -> Self
Advertise source as a stream ref. Returns the handle the
caller serializes/sends to the consumer side.
Sourcepub fn take_source(&self) -> Source<T>
pub fn take_source(&self) -> Source<T>
Take the consumer source. Calling more than once yields
Source::empty() (the receiver only exists once).
Auto Trait Implementations§
impl<T> !Freeze for SourceRefHandle<T>
impl<T> !RefUnwindSafe for SourceRefHandle<T>
impl<T> Send for SourceRefHandle<T>
impl<T> Sync for SourceRefHandle<T>
impl<T> Unpin for SourceRefHandle<T>
impl<T> UnsafeUnpin for SourceRefHandle<T>
impl<T> UnwindSafe for SourceRefHandle<T>
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