Skip to main content

FramesWithText

Struct FramesWithText 

Source
pub struct FramesWithText<'a> { /* private fields */ }
Expand description

A host’s frame provider together with its text store: frames come from the one and text from the other.

Implementations§

Source§

impl<'a> FramesWithText<'a>

Source

pub fn new(frames: &'a dyn FrameProvider, texts: &'a TextTextures) -> Self

frames with the texts texts holds.

Trait Implementations§

Source§

impl FrameProvider for FramesWithText<'_>

Source§

fn texture_for( &self, source: &SourceId, time: MediaTime, ) -> Option<SourceView<'_>>

Returns a texture for source at the requested source timestamp. Read more
Source§

fn pending_source_work( &self, source: &SourceId, time: MediaTime, ) -> Option<&PendingSourceWork>

Returns presentation work that has not yet been submitted for this physical source texture. The default covers already-ready textures.
Source§

fn source_key( &self, source: &SourceId, time: MediaTime, ) -> Option<RenderCacheKey>

A key for the texture Self::texture_for returns: the host’s promise that the texture’s pixels depend on nothing the key leaves out: the source’s content, the frame, and how it was decoded, converted, and presented. Pictures drawn from keyed sources can be kept and reused (see alpha2_render::Renderer::set_result_cache_budget); the default, no key, keeps nothing drawn from the source.
Source§

fn text(&self, key: u64) -> Option<TextTexture<'_>>

Returns the text crate::text_key names, a caption or a text generator prepared by the host’s crate::TextTextures. The default holds none: a frame that shows text then fails with RenderError::MissingText.

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for FramesWithText<'a>

§

impl<'a> !Send for FramesWithText<'a>

§

impl<'a> !Sync for FramesWithText<'a>

§

impl<'a> !UnwindSafe for FramesWithText<'a>

§

impl<'a> Freeze for FramesWithText<'a>

§

impl<'a> Unpin for FramesWithText<'a>

§

impl<'a> UnsafeUnpin for FramesWithText<'a>

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>