pub struct ProxyWorkflowManager {
pub proxy_manager: ProxyManager,
pub queue: ProxyGenerationQueue,
pub relinker: ProxyRelinker,
pub config: ProxyWorkflowConfig,
/* private fields */
}Expand description
Workflow manager tying together proxy generation, relinking, and chain selection.
Fields§
§proxy_manager: ProxyManagerThe underlying proxy manager.
queue: ProxyGenerationQueueGeneration queue.
relinker: ProxyRelinkerRelinker.
config: ProxyWorkflowConfigWorkflow config.
Implementations§
Source§impl ProxyWorkflowManager
impl ProxyWorkflowManager
Sourcepub fn new(proxy_dir: PathBuf, config: ProxyWorkflowConfig) -> Self
pub fn new(proxy_dir: PathBuf, config: ProxyWorkflowConfig) -> Self
Create a new workflow manager.
Sourcepub fn register_with_chain(
&mut self,
original_path: PathBuf,
original_width: u32,
original_height: u32,
) -> EditResult<()>
pub fn register_with_chain( &mut self, original_path: PathBuf, original_width: u32, original_height: u32, ) -> EditResult<()>
Register a source and create a multi-resolution proxy chain.
Creates quarter, half, and full-scale chain entries.
Sourcepub fn get_chain(&self, source_key: &str) -> Option<&ProxyChain>
pub fn get_chain(&self, source_key: &str) -> Option<&ProxyChain>
Get the chain for a source.
Sourcepub fn select_for_zoom(
&self,
source_key: &str,
zoom: f64,
) -> Option<&ProxyChainEntry>
pub fn select_for_zoom( &self, source_key: &str, zoom: f64, ) -> Option<&ProxyChainEntry>
Select the best proxy for a source at a given zoom level.
Sourcepub fn enqueue_all_pending(&mut self)
pub fn enqueue_all_pending(&mut self)
Enqueue proxy generation for all pending sources.
Sourcepub fn mark_chain_ready(&mut self, source_key: &str, scale: f64) -> bool
pub fn mark_chain_ready(&mut self, source_key: &str, scale: f64) -> bool
Mark a chain level as ready.
Sourcepub fn chain_count(&self) -> usize
pub fn chain_count(&self) -> usize
Number of registered chains.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProxyWorkflowManager
impl RefUnwindSafe for ProxyWorkflowManager
impl Send for ProxyWorkflowManager
impl Sync for ProxyWorkflowManager
impl Unpin for ProxyWorkflowManager
impl UnsafeUnpin for ProxyWorkflowManager
impl UnwindSafe for ProxyWorkflowManager
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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