Skip to main content

zenthra_core/
image.rs

1use std::path::PathBuf;
2
3#[derive(Debug, Clone, PartialEq, Eq, Hash)]
4pub enum ImageSource {
5    Path(PathBuf),
6    Bytes(std::sync::Arc<[u8]>),
7    Thumbnail(PathBuf),
8}
9
10#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
11pub enum ObjectFit {
12    Contain,
13    Cover,
14    Fill,
15    None,
16    ScaleDown,
17}
18
19impl Default for ObjectFit {
20    fn default() -> Self {
21        ObjectFit::Contain
22    }
23}