pub struct ImageExtendedChunkLeader { /* private fields */ }
Expand description

Image extended chunk leader is a specific leader part of stream leader.

When Leader::payload_type returns PayloadType::ImageExtendedChunk, then the leader contains ImageExtendedChunkLeader in a specific leader part.

Currently, ImageExtendedChunkLeader has the same layout as ImageLeader, but we define this type for future changes and ergonomic design.

Implementations§

source§

impl ImageExtendedChunkLeader

source

pub fn timestamp(&self) -> Duration

Timestamp when the image is captured.

source

pub fn pixel_format(&self) -> PixelFormat

Pixel format of the payload image.

source

pub fn width(&self) -> u32

Width of the payload image.

source

pub fn height(&self) -> u32

Height of the payload image.

source

pub fn x_offset(&self) -> u32

X-axis offset from the image origin.

source

pub fn y_offset(&self) -> u32

Y-axis offset from the image origin.

source

pub fn x_padding(&self) -> u16

Number of padding bytes added to the end of each line.

Trait Implementations§

source§

impl SpecificLeader for ImageExtendedChunkLeader

source§

fn from_bytes(buf: &[u8]) -> Result<Self>

Construct Specific leader from bytes.

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.