Struct ActivePipeline

Source
pub struct ActivePipeline { /* private fields */ }
Expand description

Type representing an “active” pipeline which is configured and can acquire frames.

Implementations§

Source§

impl ActivePipeline

Source

pub fn profile(&self) -> &PipelineProfile

Gets the active profile of pipeline.

Source

pub fn stop(self) -> InactivePipeline

Stop the pipeline.

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

Source

pub fn wait( &mut self, timeout_ms: Option<Duration>, ) -> Result<CompositeFrame, FrameWaitError>

Waits to get a new composite frame, blocking the calling thread.

Returns a composite frame from the pipeline, blocking the calling thread until a frame is available. This method can return an error if an internal exception occurs or if the thread waits more than the duration provided by timeout_ms (in milliseconds).

§Arguments
§Errors

Returns FrameWaitError::DidErrorDuringFrameWait if an internal error occurs while waiting for next frame(s).

Returns FrameWaitError::DidTimeoutBeforeFrameArrival if the thread waits more than timeout_ms (in milliseconds) without returning a frame.

Source

pub fn poll(&mut self) -> Result<Poll<CompositeFrame>, FrameWaitError>

Poll if next frame is immediately available.

Unlike ActivePipeline::wait, the method does not block and returns None immediately if the next frame is not available. Returns Poll::Pending if no frame is yet available, and returns Poll::Ready if the next composite frame is found.

§Errors

Returns FrameWaitError::DidErrorDuringFramePoll if an internal error occurs while polling for the next frame.

Trait Implementations§

Source§

impl Debug for ActivePipeline

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for ActivePipeline

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Send for ActivePipeline

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.