pub struct ProxyChain {
pub source_path: String,
/* private fields */
}Expand description
Multi-resolution proxy chain for zoom-dependent switching.
Fields§
§source_path: StringOriginal source path.
Implementations§
Source§impl ProxyChain
impl ProxyChain
Sourcepub fn add_level(
&mut self,
resolution: ProxyResolution,
proxy_path: PathBuf,
scale: f64,
)
pub fn add_level( &mut self, resolution: ProxyResolution, proxy_path: PathBuf, scale: f64, )
Add a resolution level.
Sourcepub fn select_for_zoom(&self, zoom: f64) -> Option<&ProxyChainEntry>
pub fn select_for_zoom(&self, zoom: f64) -> Option<&ProxyChainEntry>
Select the best proxy for a given zoom level (0.0–1.0 where 1.0 = full res).
Returns the entry whose scale is >= zoom that is ready, or falls back to the highest-resolution ready entry.
Sourcepub fn mark_ready_by_scale(&mut self, scale: f64) -> bool
pub fn mark_ready_by_scale(&mut self, scale: f64) -> bool
Mark a level as ready by scale.
Sourcepub fn level_count(&self) -> usize
pub fn level_count(&self) -> usize
Number of levels.
Sourcepub fn ready_level_count(&self) -> usize
pub fn ready_level_count(&self) -> usize
Number of ready levels.
Sourcepub fn entries(&self) -> &[ProxyChainEntry]
pub fn entries(&self) -> &[ProxyChainEntry]
Get all entries.
Trait Implementations§
Source§impl Clone for ProxyChain
impl Clone for ProxyChain
Source§fn clone(&self) -> ProxyChain
fn clone(&self) -> ProxyChain
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ProxyChain
impl RefUnwindSafe for ProxyChain
impl Send for ProxyChain
impl Sync for ProxyChain
impl Unpin for ProxyChain
impl UnsafeUnpin for ProxyChain
impl UnwindSafe for ProxyChain
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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