Skip to main content

ImageSampleExt

Trait ImageSampleExt 

Source
pub trait ImageSampleExt: Sized {
    // Required method
    fn from_image_data(
        data: &[u8],
        image_type: TagImageType,
    ) -> Result<Self, BoolError>;
}

Required Methods§

Source

fn from_image_data( data: &[u8], image_type: TagImageType, ) -> Result<Self, BoolError>

§Example
use gst_tag::prelude::*;
// let data: Vec<u8> = ...;
let sample = gst::Sample::from_image_data(&data, gst_tag::TagImageType::FrontCover)?;

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ImageSampleExt for Sample

Source§

fn from_image_data( data: &[u8], image_type: TagImageType, ) -> Result<Self, BoolError>

Implementors§