pub struct DisplayedImage {
pub kind: Kind,
pub identifier: String,
pub images: Vec<PathBuf>,
pub index: usize,
/* private fields */
}Expand description
Holds the informations about the displayed image.
it’s used to display the image itself, calling draw with parameters for its position and dimension.
Fields§
§kind: Kind§identifier: String§images: Vec<PathBuf>§index: usizeImplementations§
Source§impl DisplayedImage
impl DisplayedImage
pub fn filepath(&self) -> Arc<Path>
Sourcepub fn up_one_row(&mut self)
pub fn up_one_row(&mut self)
Only affect pdf thumbnail. Will decrease the index if possible.
Sourcepub fn down_one_row(&mut self)
pub fn down_one_row(&mut self)
Only affect pdf thumbnail. Will increase the index if possible.
pub fn is_empty(&self) -> bool
Sourcepub fn selected_path(&self) -> Cow<'_, str>
pub fn selected_path(&self) -> Cow<'_, str>
Path of the currently selected image as a COW &str.
Auto Trait Implementations§
impl Freeze for DisplayedImage
impl RefUnwindSafe for DisplayedImage
impl Send for DisplayedImage
impl Sync for DisplayedImage
impl Unpin for DisplayedImage
impl UnsafeUnpin for DisplayedImage
impl UnwindSafe for DisplayedImage
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.