pub struct ProxyMapping {
pub original_path: PathBuf,
pub proxy_path: PathBuf,
pub resolution: ProxyResolution,
pub status: ProxyStatus,
pub original_width: u32,
pub original_height: u32,
pub proxy_width: u32,
pub proxy_height: u32,
}Expand description
A mapping between an original media file and its proxy.
Fields§
§original_path: PathBufOriginal (full-resolution) file path.
proxy_path: PathBufProxy (low-resolution) file path.
resolution: ProxyResolutionResolution of the proxy.
status: ProxyStatusStatus of the proxy.
original_width: u32Original file dimensions.
original_height: u32Original file height.
proxy_width: u32Proxy dimensions.
proxy_height: u32Proxy height.
Implementations§
Source§impl ProxyMapping
impl ProxyMapping
Sourcepub fn new(
original_path: PathBuf,
proxy_path: PathBuf,
resolution: ProxyResolution,
original_width: u32,
original_height: u32,
) -> Self
pub fn new( original_path: PathBuf, proxy_path: PathBuf, resolution: ProxyResolution, original_width: u32, original_height: u32, ) -> Self
Create a new proxy mapping.
Sourcepub fn scale_factor(&self) -> f64
pub fn scale_factor(&self) -> f64
Get the scale factor (proxy / original).
Trait Implementations§
Source§impl Clone for ProxyMapping
impl Clone for ProxyMapping
Source§fn clone(&self) -> ProxyMapping
fn clone(&self) -> ProxyMapping
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 ProxyMapping
impl RefUnwindSafe for ProxyMapping
impl Send for ProxyMapping
impl Sync for ProxyMapping
impl Unpin for ProxyMapping
impl UnsafeUnpin for ProxyMapping
impl UnwindSafe for ProxyMapping
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