Skip to main content

CapturedFrame

Struct CapturedFrame 

Source
pub struct CapturedFrame {
    pub key: FrameKey,
    pub captured_at: Instant,
    pub timestamp_ns: u64,
    pub source_timestamp_ns: Option<i64>,
    pub source_sequence: Option<u64>,
    /* private fields */
}
Expand description

Cheaply shared immutable frame. RGB/native bytes never change while retained.

Fields§

§key: FrameKey

The key value.

§captured_at: Instant

Host monotonic processing-entry time, not the sensor exposure time.

§timestamp_ns: u64

The timestamp ns value.

§source_timestamp_ns: Option<i64>

The source timestamp ns value.

§source_sequence: Option<u64>

The source sequence value.

Implementations§

Source§

impl CapturedFrame

Source

pub fn age(&self) -> Duration

Performs the age operation.

Source

pub fn layout(&self) -> &FrameLayout

Performs the layout operation.

Source

pub fn bytes(&self) -> &[u8] ⓘ

Performs the bytes operation.

Source

pub fn plane(&self, index: usize) -> Option<&[u8]>

Performs the plane operation.

Source

pub fn rgb_view(&self) -> CameraResult<RgbView<'_>>

Performs the rgb_view operation.

Source

pub fn source_timestamp(&self) -> Option<SourceTimestamp>

Performs the source_timestamp operation.

Source

pub fn copy_to(&self, out: &mut [u8]) -> CameraResult<()>

Performs the copy_to operation.

Source

pub fn to_owned_bytes(&self) -> Vec<u8> ⓘ

Performs the to_owned_bytes operation.

Source

pub fn ndarray_view(&self) -> CameraResult<ArrayView3<'_, u8>>

Performs the ndarray_view operation.

Trait Implementations§

Source§

impl Debug for CapturedFrame

Source§

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

Formats the value using the given formatter. Read more

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.