Trait realsense_rust::frame::GenericFrameEx[][src]

pub trait GenericFrameEx where
    Self: Sized
{ fn into_raw(self) -> *mut rs2_frame;
unsafe fn from_raw(ptr: *mut rs2_frame) -> Self; fn metadata(&self, kind: FrameMetaDataValue) -> Result<u64> { ... }
fn number(&self) -> Result<u64> { ... }
fn data_size(&self) -> Result<usize> { ... }
fn timestamp(&self) -> Result<f64> { ... }
fn timestamp_domain(&self) -> Result<TimestampDomain> { ... }
fn data(&self) -> Result<&[u8]> { ... }
fn sensor(&self) -> Result<AnySensor> { ... }
fn stream_profile(&self) -> Result<AnyStreamProfile> { ... }
fn try_clone(&self) -> Result<Self> { ... } }

The trait provides common methods on frames of all kinds.

Required methods

fn into_raw(self) -> *mut rs2_frame[src]

Destruct and return the raw pointer. It is intended for internal use only.

Safety

You have to manage the lifetime of internal pointer by calling this method.

unsafe fn from_raw(ptr: *mut rs2_frame) -> Self[src]

Construct from a raw pointer. It is intended for internal use only.

Safety

You have to ensure the pointer is valid.

Loading content...

Provided methods

fn metadata(&self, kind: FrameMetaDataValue) -> Result<u64>[src]

Obtains the metadata of frame.

fn number(&self) -> Result<u64>[src]

Gets frame number.

fn data_size(&self) -> Result<usize>[src]

Gets raw data size in bytes.

fn timestamp(&self) -> Result<f64>[src]

Gets the timestamp.

fn timestamp_domain(&self) -> Result<TimestampDomain>[src]

Gets the domain of timestamp.

fn data(&self) -> Result<&[u8]>[src]

Gets raw data bytes in frame.

fn sensor(&self) -> Result<AnySensor>[src]

Gets the relating sensor instance.

fn stream_profile(&self) -> Result<AnyStreamProfile>[src]

Gets the relating stream profile.

fn try_clone(&self) -> Result<Self>[src]

Loading content...

Implementors

impl<Kind> GenericFrameEx for Frame<Kind> where
    Kind: FrameKind
[src]

Loading content...