[][src]Struct realsense_rust::pipeline::Pipeline

pub struct Pipeline<State> where
    State: PipelineState
{ /* fields omitted */ }

Represents the data pipeline from a RealSense device.

Methods

impl Pipeline<Inactive>[src]

pub fn new() -> RsResult<Self>[src]

Creates an instance.

pub fn from_context(context: Context) -> RsResult<Self>[src]

Consumes a context and creates an instance.

pub fn start(self, config: Option<Config>) -> RsResult<Pipeline<Active>>[src]

Start the pipeline with optional config.

The method consumes inactive pipeline itself, and returns the started pipeine.

pub async fn start_async(
    self,
    config: Option<Config>
) -> RsResult<Pipeline<Active>>
[src]

Start the pipeline asynchronously. It is analogous to Pipeline::start.

impl Pipeline<Active>[src]

pub fn profile(&self) -> &PipelineProfile[src]

Gets the profile of pipeline.

pub fn wait(&mut self, timeout: Option<Duration>) -> RsResult<Frame<Composite>>[src]

Block and wait for next frame.

pub fn try_wait(&mut self) -> RsResult<Option<Frame<Composite>>>[src]

Poll if next frame is immediately available.

Unlike Pipeline::start, the method does not block and returns None if next from is not available.

pub async fn wait_async<'_>(
    &'_ mut self,
    timeout: Option<Duration>
) -> RsResult<Frame<Composite>>
[src]

Wait for frame asynchronously. It is analogous to Pipeline::wait

pub fn stop(self) -> RsResult<Pipeline<Inactive>>[src]

Stop the pipeline.

This method consumes the pipeline instance and returns pipeline markered inactive.

Trait Implementations

impl<State: Debug> Debug for Pipeline<State> where
    State: PipelineState
[src]

impl<State> Drop for Pipeline<State> where
    State: PipelineState
[src]

impl<State> Send for Pipeline<State> where
    State: PipelineState
[src]

Auto Trait Implementations

impl<State> RefUnwindSafe for Pipeline<State> where
    State: RefUnwindSafe

impl<State> !Sync for Pipeline<State>

impl<State> Unpin for Pipeline<State> where
    State: Unpin

impl<State> UnwindSafe for Pipeline<State> where
    State: UnwindSafe

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SetParameter for T

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> 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<V, T> VZip<V> for T where
    V: MultiLane<T>,