Skip to main content

ProxyJob

Struct ProxyJob 

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

A handle to a running background proxy generation job.

Created by ProxyGenerator::generate_async. Use progress for non-blocking progress polling and wait to block until the job completes.

Implementations§

Source§

impl ProxyJob

Source

pub fn progress(&self) -> f64

Current progress in the range 0.0..=1.0.

Reads an AtomicU32 — non-blocking and safe to call from any thread. Returns 0.0 when the source container does not report a frame count or before the first frame is encoded.

Source

pub fn is_done(&self) -> bool

Returns true if the background thread has finished (success or error).

Non-blocking — does not consume the job.

Source

pub fn wait(self) -> Result<PathBuf, PreviewError>

Block until proxy generation completes and return the output path.

§Errors

Returns PreviewError if proxy generation failed or if the background thread panicked (surfaced as PreviewError::Ffmpeg { code: 0 }).

Auto Trait Implementations§

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.