pub enum PreviewMode {
Cover,
Fill,
}Expand description
Scaling mode for generating previews.
Controls how Nextcloud resizes or crops the image when generating a thumbnail with dimensions that do not match the original aspect ratio.
See the Nextcloud preview endpoint parameters for details.
Variants§
Cover
Scale image to fill dimensions and crop excess to fit the requested box.
Fill
Scale image to fit within dimensions without cropping (preserving aspect ratio).
Implementations§
Trait Implementations§
Source§impl Clone for PreviewMode
impl Clone for PreviewMode
impl Copy for PreviewMode
Source§impl Debug for PreviewMode
impl Debug for PreviewMode
Source§impl Display for PreviewMode
impl Display for PreviewMode
impl Eq for PreviewMode
Source§impl Hash for PreviewMode
impl Hash for PreviewMode
Source§impl PartialEq for PreviewMode
impl PartialEq for PreviewMode
impl StructuralPartialEq for PreviewMode
Auto Trait Implementations§
impl Freeze for PreviewMode
impl RefUnwindSafe for PreviewMode
impl Send for PreviewMode
impl Sync for PreviewMode
impl Unpin for PreviewMode
impl UnsafeUnpin for PreviewMode
impl UnwindSafe for PreviewMode
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