pub struct ResolutionManager { /* private fields */ }Expand description
Multi-resolution proxy manager.
Implementations§
Source§impl ResolutionManager
impl ResolutionManager
Sourcepub fn add_variant(&mut self, original: PathBuf, variant: ProxyVariant)
pub fn add_variant(&mut self, original: PathBuf, variant: ProxyVariant)
Add a proxy variant for an original file.
Sourcepub fn get_variants(&self, original: &PathBuf) -> Option<&Vec<ProxyVariant>>
pub fn get_variants(&self, original: &PathBuf) -> Option<&Vec<ProxyVariant>>
Get all variants for an original file.
Sourcepub fn get_best_variant(
&self,
original: &PathBuf,
target_resolution: ProxyResolution,
) -> Option<&ProxyVariant>
pub fn get_best_variant( &self, original: &PathBuf, target_resolution: ProxyResolution, ) -> Option<&ProxyVariant>
Get the best variant for a target resolution.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ResolutionManager
impl RefUnwindSafe for ResolutionManager
impl Send for ResolutionManager
impl Sync for ResolutionManager
impl Unpin for ResolutionManager
impl UnsafeUnpin for ResolutionManager
impl UnwindSafe for ResolutionManager
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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