Trait gstreamer_editing_services::prelude::ExtractableExt[][src]

pub trait ExtractableExt: 'static {
    fn asset(&self) -> Option<Asset>;
fn id(&self) -> Option<GString>;
fn set_asset<P: IsA<Asset>>(&self, asset: &P) -> Result<(), BoolError>; }

Trait containing all Extractable methods.

Implementors

crate::BaseEffect, crate::BaseTransitionClip, crate::Clip, crate::Container, crate::Effect, crate::Extractable, crate::Group, crate::Layer, crate::OperationClip, crate::TimelineElement, crate::Timeline, crate::TrackElement, crate::TransitionClip, crate::UriClip

Required methods

fn asset(&self) -> Option<Asset>[src]

Get the asset that has been set on the extractable object.

Returns

The asset set on self, or None if no asset has been set.

fn id(&self) -> Option<GString>[src]

Gets the [crate::Asset:id] of some associated asset. It may be the case that the object has no set asset, or even that such an asset does not yet exist in the GES cache. Instead, this will return the asset [crate::Asset:id] that is compatible with the current state of the object, as determined by the crate::Extractable implementer. If it was indeed extracted from an asset, this should return the same as its corresponding asset [crate::Asset:id].

Returns

The [crate::Asset:id] of some associated crate::Asset that is compatible with self’s current state.

fn set_asset<P: IsA<Asset>>(&self, asset: &P) -> Result<(), BoolError>[src]

Sets the asset for this extractable object.

When an object is extracted from an asset using crate::prelude::AssetExt::extract() its asset will be automatically set. Note that many classes that implement crate::Extractable will automatically create their objects using assets when you call their new methods. However, you can use this method to associate an object with a compatible asset if it was created by other means and does not yet have an asset. Or, for some implementations of crate::Extractable, you can use this to change the asset of the given extractable object, which will lead to a change in its state to match the new asset [crate::Asset:id].

asset

The asset to set

Returns

true if asset could be successfully set on self.

Loading content...

Implementors

impl<O: IsA<Extractable>> ExtractableExt for O[src]

fn asset(&self) -> Option<Asset>[src]

fn id(&self) -> Option<GString>[src]

fn set_asset<P: IsA<Asset>>(&self, asset: &P) -> Result<(), BoolError>[src]

Loading content...