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

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

A type allowing to build a raw laser stream.

Fields

builder: Buildermodel: Mrender: Fframe_hz: Option<u32>

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.

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 frame_hz(self, frame_hz: u32) -> Self[src]

The initial rate at which the DAC should output frames per second.

This in combination with the point_hz is used to determine the points_per_frame. Frames yielded by the user will be interpolated so that they always use exactly points_per_frame number of points per frame.

By default, this value is stream::DEFAULT_FRAME_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> Any for T where
    T: 'static + ?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.