Trait gstreamer::prelude::IsClassFor[][src]

pub unsafe trait IsClassFor: 'static {
    type Instance: ObjectType;
    pub fn get_type(&self) -> Type { ... }
pub fn upcast_ref<U>(&self) -> &U
    where
        U: IsClassFor,
        Self::Instance: IsA<<U as IsClassFor>::Instance>,
        <U as IsClassFor>::Instance: ObjectType
, { ... }
pub fn upcast_ref_mut<U>(&mut self) -> &mut U
    where
        U: IsClassFor,
        Self::Instance: IsA<<U as IsClassFor>::Instance>,
        <U as IsClassFor>::Instance: ObjectType
, { ... }
pub fn downcast_ref<U>(&self) -> Option<&U>
    where
        U: IsClassFor,
        <U as IsClassFor>::Instance: IsA<Self::Instance>,
        Self::Instance: ObjectType
, { ... }
pub fn downcast_ref_mut<U>(&mut self) -> Option<&mut U>
    where
        U: IsClassFor,
        <U as IsClassFor>::Instance: IsA<Self::Instance>,
        Self::Instance: ObjectType
, { ... }
pub fn from_type(type_: Type) -> Option<ClassRef<Self>> { ... } }

Trait for mapping a class struct type to its corresponding instance type.

Associated Types

type Instance: ObjectType[src]

Corresponding Rust instance type for this class.

Loading content...

Provided methods

pub fn get_type(&self) -> Type[src]

Get the type id for this class.

pub fn upcast_ref<U>(&self) -> &U where
    U: IsClassFor,
    Self::Instance: IsA<<U as IsClassFor>::Instance>,
    <U as IsClassFor>::Instance: ObjectType
[src]

Casts this class to a reference to a parent type's class.

pub fn upcast_ref_mut<U>(&mut self) -> &mut U where
    U: IsClassFor,
    Self::Instance: IsA<<U as IsClassFor>::Instance>,
    <U as IsClassFor>::Instance: ObjectType
[src]

Casts this class to a mutable reference to a parent type's class.

pub fn downcast_ref<U>(&self) -> Option<&U> where
    U: IsClassFor,
    <U as IsClassFor>::Instance: IsA<Self::Instance>,
    Self::Instance: ObjectType
[src]

Casts this class to a reference to a child type's class or fails if this class is not implementing the child class.

pub fn downcast_ref_mut<U>(&mut self) -> Option<&mut U> where
    U: IsClassFor,
    <U as IsClassFor>::Instance: IsA<Self::Instance>,
    Self::Instance: ObjectType
[src]

Casts this class to a mutable reference to a child type's class or fails if this class is not implementing the child class.

pub fn from_type(type_: Type) -> Option<ClassRef<Self>>[src]

Gets the class struct corresponding to type_.

This will return None if type_ is not a subclass of Self.

Loading content...

Implementations on Foreign Types

impl IsClassFor for ObjectClass[src]

impl IsClassFor for InitiallyUnownedClass[src]

impl IsClassFor for BindingClass[src]

Loading content...

Implementors

impl IsClassFor for AllocatorClass[src]

impl IsClassFor for BinClass[src]

type Instance = Bin

impl IsClassFor for BufferPoolClass[src]

impl IsClassFor for BusClass[src]

type Instance = Bus

impl IsClassFor for ClockClass[src]

impl IsClassFor for DeviceClass[src]

impl IsClassFor for DeviceMonitorClass[src]

impl IsClassFor for DeviceProviderClass[src]

impl IsClassFor for DeviceProviderFactoryClass[src]

impl IsClassFor for ElementClass[src]

impl IsClassFor for ElementFactoryClass[src]

impl IsClassFor for GhostPadClass[src]

impl IsClassFor for gstreamer::ObjectClass[src]

impl IsClassFor for PadClass[src]

type Instance = Pad

impl IsClassFor for PadTemplateClass[src]

impl IsClassFor for PipelineClass[src]

impl IsClassFor for PluginClass[src]

impl IsClassFor for PluginFeatureClass[src]

impl IsClassFor for ProxyPadClass[src]

impl IsClassFor for RegistryClass[src]

impl IsClassFor for StreamClass[src]

impl IsClassFor for StreamCollectionClass[src]

impl IsClassFor for SystemClockClass[src]

impl IsClassFor for TypeFindFactoryClass[src]

Loading content...