[−][src]Struct lasy::stream::raw::Stream
A clone-able handle around a raw laser stream.
Methods
impl<M> Stream<M>
[src]
pub fn set_point_hz(&self, point_hz: u32) -> Result<(), SendError<()>>
[src]
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
.
pub fn set_latency_points(&self, points: u32) -> Result<(), SendError<()>>
[src]
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
.
pub fn send<F>(&self, update: F) -> Result<(), SendError<ModelUpdate<M>>> where
F: FnOnce(&mut M) + Send + 'static,
[src]
F: FnOnce(&mut M) + Send + 'static,
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.
Trait Implementations
impl<M: Clone> Clone for Stream<M>
[src]
fn clone(&self) -> Stream<M>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<M> Drop for Stream<M>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,