[][src]Struct gstreamer::Allocator

pub struct Allocator(_, _);

Memory is usually created by allocators with a AllocatorExt::alloc method call. When None is used as the allocator, the default allocator will be used.

New allocators can be registered with Allocator::register. Allocators are identified by name and can be retrieved with Allocator::find. AllocatorExt::set_default can be used to change the default allocator.

New memory can be created with Memory::new_wrapped that wraps the memory allocated elsewhere.

Implements

AllocatorExt, GstObjectExt, glib::object::ObjectExt, AllocatorExtManual

Methods

impl Allocator[src]

pub fn find(name: Option<&str>) -> Option<Allocator>[src]

Find a previously registered allocator with name. When name is None, the default allocator will be returned.

name

the name of the allocator

Returns

a Allocator or None when the allocator with name was not registered. Use GstObjectExt::unref to release the allocator after usage.

pub fn register<P: IsA<Allocator>>(name: &str, allocator: &P)[src]

Registers the memory allocator with name. This function takes ownership of allocator.

name

the name of the allocator

allocator

Allocator

Trait Implementations

impl Clone for Allocator[src]

impl Debug for Allocator[src]

impl Eq for Allocator[src]

impl Hash for Allocator[src]

impl IsA<Object> for Allocator[src]

impl Ord for Allocator[src]

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

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

impl Send for Allocator[src]

impl StaticType for Allocator[src]

impl Sync for Allocator[src]

Auto Trait Implementations

impl RefUnwindSafe for Allocator

impl Unpin for Allocator

impl UnwindSafe for Allocator

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<'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> 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.