[−][src]Trait gstreamer_sdp::prelude::IsClassFor
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.
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]
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.
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]
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.
pub fn downcast_ref<U>(&self) -> Option<&U> where
U: IsClassFor,
<U as IsClassFor>::Instance: IsA<Self::Instance>,
Self::Instance: ObjectType,
[src]
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.
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]
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.
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
.