Struct BufferData

Source
pub struct BufferData<'r, Dir, Met: Method> { /* private fields */ }

Implementations§

Source§

impl<'r, Met: Method> BufferData<'r, Out, Met>

Source

pub fn set_len(&mut self, len: usize)

Set new size of buffer

New size should be less than or equal to capacity. If new size greater than capacity it will be set to be equal to capacity.

Source§

impl<'r, Dir, Met: Method> BufferData<'r, Dir, Met>

Source

pub fn is_empty(&self) -> bool

Check no used bytes in buffer

Source

pub fn len(&self) -> usize

Get used data of buffer in bytes

Source

pub fn capacity(&self) -> usize

Get available buffer capacity in bytes

Methods from Deref<Target = Buffer>§

Source

pub fn timestamp<T: IsTimestamp>(&self) -> T

Get timestamp

Source

pub fn set_timestamp<T: IsTimestamp>(&mut self, time: T)

Set timestamp

Source

pub fn has_timecode(&self) -> bool

Buffer has time code

Source

pub fn timecode(&self) -> Option<TimeCode>

Buffer time code

Source

pub fn set_timecode(&mut self, timecode: Option<TimeCode>)

Set time code

Source

pub fn is_queued(&self) -> bool

Is buffer locked by driver

Source

pub fn index(&self) -> u32

Buffer index

Source

pub fn type_(&self) -> BufferType

Buffer type

Source

pub fn bytes_used(&self) -> u32

Number of bytes in use

Source

pub fn flags(&self) -> BufferFlag

Buffer flags

Source

pub fn field(&self) -> Field

Buffer field

Source

pub fn sequence(&self) -> u32

Buffer sequence

Source

pub fn memory(&self) -> Memory

Buffer memory

Source

pub fn length(&self) -> u32

Buffer capacity in bytes

Trait Implementations§

Source§

impl<'r, Met: Method> AsMut<[u8]> for BufferData<'r, Out, Met>

Source§

fn as_mut(&mut self) -> &mut [u8]

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl<'r, Dir, Met: Method> AsRef<[u8]> for BufferData<'r, Dir, Met>

Source§

fn as_ref(&self) -> &[u8]

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<'r, Dir, Met: Method> Deref for BufferData<'r, Dir, Met>

Source§

type Target = Buffer

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<'r, Met: Method> DerefMut for BufferData<'r, Out, Met>

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl<'r, Dir, Met: Method> Display for BufferData<'r, Dir, Met>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'r, Dir, Met> Freeze for BufferData<'r, Dir, Met>

§

impl<'r, Dir, Met> !RefUnwindSafe for BufferData<'r, Dir, Met>

§

impl<'r, Dir, Met> !Send for BufferData<'r, Dir, Met>

§

impl<'r, Dir, Met> !Sync for BufferData<'r, Dir, Met>

§

impl<'r, Dir, Met> Unpin for BufferData<'r, Dir, Met>
where Dir: Unpin,

§

impl<'r, Dir, Met> !UnwindSafe for BufferData<'r, Dir, Met>

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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
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.