Struct realsense_rust::pipeline::Pipeline [−][src]
Represents the data pipeline from a RealSense device.
Implementations
impl Pipeline<Inactive>
[src]
pub fn new() -> Result<Self>
[src]
Creates an instance.
pub fn from_context(context: Context) -> Result<Self>
[src]
Consumes a context and creates an instance.
pub fn start(self, config: impl Into<Option<Config>>) -> Result<ActivePipeline>
[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: impl Into<Option<Config>>
) -> Result<ActivePipeline>
[src]
self,
config: impl Into<Option<Config>>
) -> Result<ActivePipeline>
Start the pipeline asynchronously. It is analogous to Pipeline::start.
pub fn into_raw_parts(self) -> (*mut rs2_pipeline, *mut rs2_context)
[src]
Unpack the pipeline into raw pointers.
It returns the raw pointer along with the context pointer that the pipeline depends on.
pub unsafe fn from_raw_parts(
pipeline_ptr: *mut rs2_pipeline,
context_ptr: *mut rs2_context
) -> Self
[src]
pipeline_ptr: *mut rs2_pipeline,
context_ptr: *mut rs2_context
) -> Self
Construct an inactive pipeline from raw pointers.
It assumes the pipeline pointers is built atop from the context pointer.
impl Pipeline<Active>
[src]
pub fn profile(&self) -> &PipelineProfile
[src]
Gets the active profile of pipeline.
pub fn wait(
&mut self,
timeout: impl Into<Option<Duration>>
) -> Result<Option<CompositeFrame>>
[src]
&mut self,
timeout: impl Into<Option<Duration>>
) -> Result<Option<CompositeFrame>>
Block until the next frame is available.
When the timeout is set, it returns Ok(Some(frame))
if the frame is available,
or returns Ok(None)
when timeout occurs.
If the timeout is None
, it waits indefinitely before the next frame.
pub fn try_wait(&mut self) -> Result<Option<CompositeFrame>>
[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: impl Into<Option<Duration>>
) -> Result<Option<CompositeFrame>>
[src]
&mut self,
timeout: impl Into<Option<Duration>>
) -> Result<Option<CompositeFrame>>
Wait for the next frame asynchronously.
The method is analogous to Pipeline::wait.
When the timeout is set, it returns Ok(Some(frame))
if the frame is available,
or returns Ok(None)
when timeout occurs.
If the timeout is None
, it waits indefinitely before the next frame.
pub fn stop(self) -> Result<InactivePipeline>
[src]
Stop the pipeline.
This method consumes the pipeline instance and returns pipeline markered inactive.
pub fn into_raw_parts(
self
) -> (*mut rs2_pipeline, *mut rs2_context, *mut rs2_pipeline_profile, Option<*mut rs2_config>)
[src]
self
) -> (*mut rs2_pipeline, *mut rs2_context, *mut rs2_pipeline_profile, Option<*mut rs2_config>)
Unpack the pipeline into raw pointers.
After calling this method, you have to take care of their lifetime manually.
pub unsafe fn from_raw_parts(
pipeline_ptr: *mut rs2_pipeline,
context_ptr: *mut rs2_context,
profile_ptr: *mut rs2_pipeline_profile,
config_ptr: Option<*mut rs2_config>
) -> Self
[src]
pipeline_ptr: *mut rs2_pipeline,
context_ptr: *mut rs2_context,
profile_ptr: *mut rs2_pipeline_profile,
config_ptr: Option<*mut rs2_config>
) -> Self
Construct an active pipeline from raw pointers.
It assumes the pipeline pointer is built from the context pointer, and profile pointer is the active profile of the pipeline.
Trait Implementations
impl<State: Debug> Debug for Pipeline<State> where
State: PipelineState,
[src]
State: PipelineState,
impl<State> Drop for Pipeline<State> where
State: PipelineState,
[src]
State: PipelineState,
impl<State> Send for Pipeline<State> where
State: PipelineState,
[src]
State: PipelineState,
Auto Trait Implementations
impl<State> RefUnwindSafe for Pipeline<State> where
State: RefUnwindSafe,
State: RefUnwindSafe,
impl<State> !Sync for Pipeline<State>
impl<State> Unpin for Pipeline<State> where
State: Unpin,
State: Unpin,
impl<State> UnwindSafe for Pipeline<State> where
State: UnwindSafe,
State: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn is_in_subset(&self) -> bool
pub fn to_subset_unchecked(&self) -> SS
pub fn from_subset(element: &SS) -> SP
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,