[][src]Struct aravis::Buffer

pub struct Buffer(_, _);

Methods

impl Buffer[src]

pub fn new_allocate(size: usize) -> Buffer[src]

Creates a new buffer for the storage of the video stream images. The data space is allocated by this function, and will be freed when the buffer is destroyed.

size

payload size

Returns

a new Buffer object

impl Buffer[src]

pub unsafe fn new_preallocated(data: *mut u8, len: usize) -> Self[src]

Create an Aravis buffer from a pre-allocated raw buffer.

The created buffer has no registered user data or destroy callback, so management of the underlying buffer has to be done externally. The buffer can be identified later when it is returned by a stream only byt the data pointer.

Safety

The resulting buffer borrows the data, but it carries no lifetime. The user has to ensure the buffer stays valid.

impl Buffer[src]

pub fn new_leaked_box(len: usize) -> Self[src]

Create a new buffer backed by a leaked Box<[u8]>.

The buffer can later be turned into an image using [Self::into_image]. If the buffer is dropped without taking ownership of the data again, the memory is leaked.

pub fn new_leaked_image(
    format: PixelFormat,
    width: usize,
    height: usize
) -> Self
[src]

Create a new buffer for an image of the specified format and dimensions, backed by a leaked Box<[u8]>.

The buffer can later be turned into an image using [Self::into_image]. If the buffer is dropped without taking ownership of the data again, the memory is leaked.

Trait Implementations

impl Clone for Buffer[src]

impl Debug for Buffer[src]

impl Display for Buffer[src]

impl Eq for Buffer[src]

impl Hash for Buffer[src]

impl Ord for Buffer[src]

impl<T: ObjectType> PartialEq<T> for Buffer[src]

impl<T: ObjectType> PartialOrd<T> for Buffer[src]

impl StaticType for Buffer[src]

Auto Trait Implementations

impl RefUnwindSafe for Buffer

impl !Send for Buffer

impl !Sync for Buffer

impl Unpin for Buffer

impl UnwindSafe for Buffer

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Super, Sub> CanDowncast<Sub> for Super where
    Sub: IsA<Super>,
    Super: IsA<Super>, 
[src]

impl<T> Cast for T where
    T: ObjectType
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ObjectExt for T where
    T: ObjectType
[src]

impl<T> SetParameter for T

impl<'a, T> ToGlibContainerFromSlice<'a, *const GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *const GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToSendValue for T where
    T: ToValue + SetValue + Send + ?Sized
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToValue for T where
    T: SetValue + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.