pub struct ExportJobQueue { /* private fields */ }Expand description
A sequential queue of export jobs.
Implementations§
Source§impl ExportJobQueue
impl ExportJobQueue
Sourcepub fn add_glb(&mut self, name: impl Into<String>, path: PathBuf) -> usize
pub fn add_glb(&mut self, name: impl Into<String>, path: PathBuf) -> usize
Add a GLB export job.
Sourcepub fn add_obj(&mut self, name: impl Into<String>, path: PathBuf) -> usize
pub fn add_obj(&mut self, name: impl Into<String>, path: PathBuf) -> usize
Add an OBJ export job.
Sourcepub fn add_stl(&mut self, name: impl Into<String>, path: PathBuf) -> usize
pub fn add_stl(&mut self, name: impl Into<String>, path: PathBuf) -> usize
Add an STL export job.
Sourcepub fn add_ply(&mut self, name: impl Into<String>, path: PathBuf) -> usize
pub fn add_ply(&mut self, name: impl Into<String>, path: PathBuf) -> usize
Add a PLY export job.
Sourcepub fn add_json(&mut self, name: impl Into<String>, path: PathBuf) -> usize
pub fn add_json(&mut self, name: impl Into<String>, path: PathBuf) -> usize
Add a JSON mesh export job.
Sourcepub fn pending_count(&self) -> usize
pub fn pending_count(&self) -> usize
Number of jobs still waiting to run.
Sourcepub fn failed_jobs(&self) -> Vec<&ExportJob>
pub fn failed_jobs(&self) -> Vec<&ExportJob>
Collect references to all failed jobs.
Sourcepub fn run(
&mut self,
mesh: &MeshBuffers,
progress: impl FnMut(usize, usize),
) -> QueueResult
pub fn run( &mut self, mesh: &MeshBuffers, progress: impl FnMut(usize, usize), ) -> QueueResult
Execute all pending jobs sequentially using mesh.
progress is called with (completed_so_far, total_pending) after
every job, whether it succeeded or failed.
Sourcepub fn retry_failed(&mut self, mesh: &MeshBuffers) -> QueueResult
pub fn retry_failed(&mut self, mesh: &MeshBuffers) -> QueueResult
Retry all failed jobs using mesh.
Sourcepub fn remove_completed(&mut self)
pub fn remove_completed(&mut self)
Remove every job whose status is Completed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ExportJobQueue
impl RefUnwindSafe for ExportJobQueue
impl Send for ExportJobQueue
impl Sync for ExportJobQueue
impl Unpin for ExportJobQueue
impl UnsafeUnpin for ExportJobQueue
impl UnwindSafe for ExportJobQueue
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more