MCPcopy Create free account
hub / github.com/Logicalshift/flo_draw / receive

Method receive

canvas/src/drawing_target.rs:77–86  ·  view source on GitHub ↗

Sends the results of a future to this target

(self, actions: DrawStream)

Source from the content-addressed store, hash-verified

75 /// Sends the results of a future to this target
76 ///
77 pub fn receive<DrawStream: Unpin+Stream<Item=Draw>>(self, actions: DrawStream) -> impl Future {
78 async move {
79 let mut actions = actions.ready_chunks(1000);
80 let target = self;
81
82 while let Some(drawing) = actions.next().await {
83 target.write(drawing);
84 }
85 }
86 }
87}
88
89///

Callers

nothing calls this directly

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected