[][src]Enum broot::preview::Preview

pub enum Preview {
    Syntactic(SyntacticView),
    Hex(HexView),
    IOError,
}

Variants

Syntactic(SyntacticView)
Hex(HexView)
IOError

Implementations

impl Preview[src]

pub fn unfiltered(path: &Path, con: &AppContext) -> Self[src]

build a text preview (maybe with syntaxic coloring) if possible, a hex (binary) view if content isnt't UTF8, or a IOError when there's a IO problem

pub fn filtered(
    path: &Path,
    pattern: InputPattern,
    dam: &mut Dam,
    con: &AppContext
) -> Option<Self>
[src]

try to build a filtered text view. Will return None if the dam gets an event before it's built

pub fn hex(path: &Path) -> Self[src]

return a hex_view, suitable for binary, or Self::IOError if there was an error

pub fn pattern(&self) -> InputPattern[src]

pub fn try_scroll(&mut self, cmd: ScrollCommand) -> bool[src]

pub fn is_filterable(&self) -> bool[src]

pub fn get_selected_line_number(&self) -> Option<LineNumber>[src]

pub fn try_select_line_number(&mut self, number: usize) -> bool[src]

pub fn unselect(&mut self)[src]

pub fn try_select_y(&mut self, y: u16) -> bool[src]

pub fn select_previous_line(&mut self)[src]

pub fn select_next_line(&mut self)[src]

pub fn select_first(&mut self)[src]

pub fn select_last(&mut self)[src]

pub fn display(
    &mut self,
    w: &mut W,
    screen: &Screen,
    panel_skin: &PanelSkin,
    area: &Area
) -> Result<(), ProgramError>
[src]

pub fn display_info(
    &mut self,
    w: &mut W,
    screen: &Screen,
    panel_skin: &PanelSkin,
    area: &Area
) -> Result<(), ProgramError>
[src]

Auto Trait Implementations

impl !RefUnwindSafe for Preview

impl Send for Preview

impl Sync for Preview

impl Unpin for Preview

impl UnwindSafe for Preview

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.