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

Method write

canvas/src/drawing_target.rs:47–56  ·  view source on GitHub ↗

Sends some drawing instructions to this target

(&self, drawing: Drawing)

Source from the content-addressed store, hash-verified

45 /// Sends some drawing instructions to this target
46 ///
47 pub fn write<Drawing: Send+IntoIterator<Item=Draw>>(&self, drawing: Drawing) {
48 // Write the drawing instructions to the pending queue
49 let waker = self.stream_core.sync(move |core| {
50 core.write(drawing.into_iter());
51 core.take_waker()
52 });
53
54 // Wake the stream, if anything is listening
55 waker.map(|waker| waker.wake());
56 }
57
58 ///
59 /// Provides a way to draw on this target via a graphics context

Callers 3

drawMethod · 0.45
receiveMethod · 0.45

Calls 2

take_wakerMethod · 0.80
mapMethod · 0.80

Tested by 1