pub struct StreamBuilder;Expand description
Builds from a stream of values — the reference’s StreamBuilder, over
BuildContext::use_stream: the work is given a StreamSink and adds its values to it.
Implementations§
Source§impl StreamBuilder
impl StreamBuilder
Sourcepub fn new<K, T, F>(
key: K,
make: impl Fn(&K, StreamSink<T>) -> F + 'static,
build: impl Fn(&BuildContext<'_>, AsyncSnapshot<T>) -> Box<dyn Widget> + 'static,
) -> Component
pub fn new<K, T, F>( key: K, make: impl Fn(&K, StreamSink<T>) -> F + 'static, build: impl Fn(&BuildContext<'_>, AsyncSnapshot<T>) -> Box<dyn Widget> + 'static, ) -> Component
A component that runs make(&key, sink) once per key, and builds from the latest
value it gave.
Auto Trait Implementations§
impl Freeze for StreamBuilder
impl RefUnwindSafe for StreamBuilder
impl Send for StreamBuilder
impl Sync for StreamBuilder
impl Unpin for StreamBuilder
impl UnsafeUnpin for StreamBuilder
impl UnwindSafe for StreamBuilder
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