pub struct DartStreamBuilder {
pub item_type: DartType,
}Expand description
Helper for building common Dart stream patterns.
Fields§
§item_type: DartTypeImplementations§
Source§impl DartStreamBuilder
impl DartStreamBuilder
pub fn new(item_type: DartType) -> Self
Sourcepub fn from_iterable(items: Vec<DartExpr>) -> DartExpr
pub fn from_iterable(items: Vec<DartExpr>) -> DartExpr
Generate a Stream.fromIterable([...]) expression.
Sourcepub fn listen(stream: DartExpr, param: &str, body: Vec<DartStmt>) -> DartStmt
pub fn listen(stream: DartExpr, param: &str, body: Vec<DartStmt>) -> DartStmt
Generate a stream.listen((item) { ... }) statement.
Sourcepub fn controller_decl(&self, name: &str) -> DartStmt
pub fn controller_decl(&self, name: &str) -> DartStmt
Generate a StreamController<T> declaration.
Trait Implementations§
Source§impl Clone for DartStreamBuilder
impl Clone for DartStreamBuilder
Source§fn clone(&self) -> DartStreamBuilder
fn clone(&self) -> DartStreamBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DartStreamBuilder
impl RefUnwindSafe for DartStreamBuilder
impl Send for DartStreamBuilder
impl Sync for DartStreamBuilder
impl Unpin for DartStreamBuilder
impl UnsafeUnpin for DartStreamBuilder
impl UnwindSafe for DartStreamBuilder
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