Skip to main content

Asset

Struct Asset 

Source
pub struct Asset { /* private fields */ }
Expand description

Re-exports the AVPlayer framework surface for this item. Safe wrapper around AVAsset.

Implementations§

Source§

impl Asset

Source

pub fn duration(&self) -> Result<Time, AVPlayerError>

Asset duration.

Source

pub fn metadata(&self) -> Result<Vec<MetadataItem>, AVPlayerError>

Static metadata attached to the asset.

Source

pub fn url(&self) -> Result<Option<String>, AVPlayerError>

Asset URL when backed by AVURLAsset.

Source

pub fn status_of_value( &self, key: &str, ) -> Result<KeyValueStatus, AVPlayerError>

Query the current load status of a key without triggering loading.

Source

pub fn load_values_asynchronously<I, S>( &self, keys: I, ) -> Result<Vec<KeyLoadStatus>, AVPlayerError>
where I: IntoIterator<Item = S>, S: AsRef<str>,

Trigger asynchronous loading for the given keys and wait for completion.

Source

pub fn tracks(&self) -> Result<Vec<AssetTrack>, AVPlayerError>

Enumerate all tracks owned by the asset.

Source§

impl Asset

Source§

impl Asset

Source§

impl Asset

Source§

impl Asset

Source§

impl Asset

Trait Implementations§

Source§

impl Debug for Asset

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for Asset

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl Send for Asset

Auto Trait Implementations§

§

impl Freeze for Asset

§

impl RefUnwindSafe for Asset

§

impl !Sync for Asset

§

impl Unpin for Asset

§

impl UnsafeUnpin for Asset

§

impl UnwindSafe for Asset

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.