Enum broot::image::SourceImage
source · pub enum SourceImage {
Bitmap(DynamicImage),
Svg(Tree),
}
Variants§
Bitmap(DynamicImage)
Svg(Tree)
Implementations§
source§impl SourceImage
impl SourceImage
pub fn new(path: &Path) -> Result<Self, ProgramError>
pub fn dimensions(&self) -> (u32, u32)
pub fn fitting( &self, max_width: u32, max_height: u32, bg_color: Option<CrosstermColor> ) -> Result<DynamicImage, ProgramError>
pub fn optimal(&self) -> Result<Cow<'_, DynamicImage>, ProgramError>
Auto Trait Implementations§
impl !RefUnwindSafe for SourceImage
impl !Send for SourceImage
impl !Sync for SourceImage
impl Unpin for SourceImage
impl !UnwindSafe for SourceImage
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