pub enum Preview {
Syntaxed(HLContent),
Text(TextContent),
Binary(BinaryContent),
Pdf(PdfContent),
Archive(ZipContent),
Exif(ExifContent),
Thumbnail(Pixels),
Media(MediaContent),
Directory(Directory),
Empty,
}Expand description
Different kind of preview used to display some informaitons About the file. We check if it’s an archive first, then a pdf file, an image, a media file
Variants§
Syntaxed(HLContent)
Text(TextContent)
Binary(BinaryContent)
Pdf(PdfContent)
Archive(ZipContent)
Exif(ExifContent)
Thumbnail(Pixels)
Media(MediaContent)
Directory(Directory)
Empty
Implementations§
source§impl Preview
impl Preview
sourcepub fn new(file_info: &FileInfo) -> FmResult<Self>
pub fn new(file_info: &FileInfo) -> FmResult<Self>
Creates a new preview instance based on the filekind and the extension of the file. Sometimes it reads the content of the file, sometimes it delegates it to the display method.