[][src]Trait gstreamer_gl::prelude::IsClassFor

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

Corresponding Rust instance type for this class.

Loading content...

Provided methods

fn get_type(&self) -> Type

Get the type id for this class.

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

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

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

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

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

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

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

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

fn from_type(type_: Type) -> Option<ClassRef<Self>>

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]

type Instance = Object

impl IsClassFor for InitiallyUnownedClass[src]

type Instance = InitiallyUnowned

impl IsClassFor for BindingClass[src]

type Instance = Binding

impl IsClassFor for DeviceClass[src]

type Instance = Device

impl IsClassFor for GhostPadClass[src]

type Instance = GhostPad

impl IsClassFor for StreamClass[src]

type Instance = Stream

impl IsClassFor for PadTemplateClass[src]

type Instance = PadTemplate

impl IsClassFor for DeviceMonitorClass[src]

type Instance = DeviceMonitor

impl IsClassFor for ElementFactoryClass[src]

type Instance = ElementFactory

impl IsClassFor for PluginClass[src]

type Instance = Plugin

impl IsClassFor for BinClass[src]

type Instance = Bin

impl IsClassFor for SystemClockClass[src]

type Instance = SystemClock

impl IsClassFor for ProxyPadClass[src]

type Instance = ProxyPad

impl IsClassFor for ClockClass[src]

type Instance = Clock

impl IsClassFor for DeviceProviderClass[src]

type Instance = DeviceProvider

impl IsClassFor for ElementClass[src]

type Instance = Element

impl IsClassFor for RegistryClass[src]

type Instance = Registry

impl IsClassFor for ObjectClass[src]

type Instance = Object

impl IsClassFor for DeviceProviderFactoryClass[src]

type Instance = DeviceProviderFactory

impl IsClassFor for TypeFindFactoryClass[src]

type Instance = TypeFindFactory

impl IsClassFor for AllocatorClass[src]

type Instance = Allocator

impl IsClassFor for StreamCollectionClass[src]

type Instance = StreamCollection

impl IsClassFor for PadClass[src]

type Instance = Pad

impl IsClassFor for BufferPoolClass[src]

type Instance = BufferPool

impl IsClassFor for PluginFeatureClass[src]

type Instance = PluginFeature

impl IsClassFor for PipelineClass[src]

type Instance = Pipeline

impl IsClassFor for BusClass[src]

type Instance = Bus

impl IsClassFor for VideoSinkClass[src]

type Instance = VideoSink

impl IsClassFor for VideoBufferPoolClass[src]

type Instance = VideoBufferPool

impl IsClassFor for VideoFilterClass[src]

type Instance = VideoFilter

impl IsClassFor for VideoDecoderClass[src]

type Instance = VideoDecoder

impl IsClassFor for VideoEncoderClass[src]

type Instance = VideoEncoder

impl IsClassFor for PushSrcClass[src]

type Instance = PushSrc

impl IsClassFor for BaseSinkClass[src]

type Instance = BaseSink

impl IsClassFor for AdapterClass[src]

type Instance = Adapter

impl IsClassFor for BaseSrcClass[src]

type Instance = BaseSrc

impl IsClassFor for BaseParseClass[src]

type Instance = BaseParse

impl IsClassFor for BaseTransformClass[src]

type Instance = BaseTransform

impl IsClassFor for AggregatorPadClass[src]

type Instance = AggregatorPad

impl IsClassFor for AggregatorClass[src]

type Instance = Aggregator

Loading content...

Implementors

impl IsClassFor for GLBaseFilterClass[src]

impl IsClassFor for GLColorConvertClass[src]

impl IsClassFor for GLContextClass[src]

impl IsClassFor for GLDisplayClass[src]

impl IsClassFor for GLDisplayEGLClass[src]

impl IsClassFor for GLDisplayWaylandClass[src]

impl IsClassFor for GLDisplayX11Class[src]

impl IsClassFor for GLFramebufferClass[src]

impl IsClassFor for GLOverlayCompositorClass[src]

impl IsClassFor for GLSLStageClass[src]

impl IsClassFor for GLShaderClass[src]

impl IsClassFor for GLUploadClass[src]

impl IsClassFor for GLViewConvertClass[src]

impl IsClassFor for GLWindowClass[src]

Loading content...