[][src]Struct lasy::stream::raw::Stream

pub struct Stream<M> { /* fields omitted */ }

A clone-able handle around a raw laser stream.

Methods

impl<M> Stream<M>[src]

pub fn send<F>(
    &self,
    update: F
) -> Result<(), SendError<Box<dyn FnMut(&mut M) + Send + 'static>>> where
    F: FnOnce(&mut M) + Send + 'static, 
[src]

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.

Auto Trait Implementations

impl<M> Send for Stream<M> where
    M: Send

impl<M> !Sync for Stream<M>

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]