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
impl ProxyJob
Sourcepub fn progress(&self) -> f64
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.
Sourcepub fn is_done(&self) -> bool
pub fn is_done(&self) -> bool
Returns true if the background thread has finished (success or error).
Non-blocking — does not consume the job.
Sourcepub fn wait(self) -> Result<PathBuf, PreviewError>
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§
impl !RefUnwindSafe for ProxyJob
impl !UnwindSafe for ProxyJob
impl Freeze for ProxyJob
impl Send for ProxyJob
impl Sync for ProxyJob
impl Unpin for ProxyJob
impl UnsafeUnpin for ProxyJob
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more