Struct nannou_laser::stream::raw::Stream [−][src]
pub struct Stream<M> { /* fields omitted */ }
Expand description
A clone-able handle around a raw laser stream.
Implementations
Update the rate at which the DAC should process points per second.
This value should be no greater than the detected DAC’s max_point_hz
.
By default this value is stream::DEFAULT_POINT_HZ
.
The maximum latency specified as a number of points.
Each time the laser indicates its “fullness”, the raw stream will request enough points
from the render function to fill the DAC buffer up to latency_points
.
This value should be no greaterthan the DAC’s buffer_capacity
.
The DetectedDac
with which the Stream was initialised.
Returns None
if no DAC was specified, meaning that the stream is associated with the
first DAC it could find.
Send the given model update to the laser thread to be applied ASAP.
If the laser is currently rendering, the update will be applied immediately after the function call completes.
If the stream is currently paused, the update will be applied immediately.
Note: This function will be applied on the real-time laser thread so users should avoid performing any kind of I/O, locking, blocking, (de)allocations or anything that may run for an indeterminate amount of time.
Returns whether or not the communication thread has closed.
A stream may be closed if an error has occurred and the stream error callback indicated to
close the thread. A stream might also be closed if another close
was called on another
handle to the stream.
In this case, the Stream
should be closed or dropped and a new one should be created to
replace it.
Close the TCP communication thread and wait for the thread to join.
This consumes and drops the Stream
, returning the result produced by joining the thread.
This method will block until the associated thread has been joined.
If the thread has already been closed by another handle to the stream, this will return
None
.
Trait Implementations
Auto Trait Implementations
impl<M> !RefUnwindSafe for Stream<M>
impl<M> !UnwindSafe for Stream<M>
Blanket Implementations
Mutably borrows from an owned value. Read more