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

pub struct Builder<M, F> {
    pub builder: Builder,
    pub model: M,
    pub render: F,
    // some fields omitted
}

A type allowing to build a raw laser stream.

Fields

builder: Buildermodel: Mrender: F

Methods

impl<M, F> Builder<M, F>[src]

pub fn detected_dac(self, dac: DetectedDac) -> Self[src]

The DAC with which the stream should be established.

If none is specified, the stream will associate itself with the first DAC detecged on the system.

DAC Dropouts

If communication is lost with the DAC that was specified by this method, the stream will attempt to re-establish connection with this DAC as quickly as possible. If no DAC was specified, the stream will attempt to establish a new connection with the next DAC that is detected on the system.

pub fn point_hz(self, point_hz: u32) -> Self[src]

The initial 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 latency_points(self, points: u32) -> Self[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.

pub fn build(self) -> Result<Stream<M>> where
    M: 'static + Send,
    F: 'static + RenderFn<M> + Send
[src]

Build the stream with the specified parameters.

Note: If no dac was specified, this will method will block until a DAC is detected. The first detected DAC is the DAC with which a stream will be established.

Auto Trait Implementations

impl<M, F> Send for Builder<M, F> where
    F: Send,
    M: Send

impl<M, F> Sync for Builder<M, F> where
    F: Sync,
    M: Sync

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]