[][src]Trait kg_diag::Reader

pub trait Reader {
    fn path(&self) -> Option<&Path>;
fn len(&self) -> Option<usize>;
fn eof(&self) -> bool;
fn position(&self) -> Position;
fn seek(&mut self, pos: Position) -> IoResult<()>;
fn input(&mut self) -> IoResult<Cow<str>>;
fn slice(&mut self, start: usize, end: usize) -> IoResult<Cow<str>>;
fn quote(
        &mut self,
        from: Position,
        to: Position,
        lines_before: u32,
        lines_after: u32,
        message: Cow<str>
    ) -> Quote; fn slice_pos(&mut self, from: Position, to: Position) -> IoResult<Cow<str>> { ... }
fn reset(&mut self) -> IoResult<()> { ... } }

Required methods

fn path(&self) -> Option<&Path>

fn len(&self) -> Option<usize>

fn eof(&self) -> bool

fn position(&self) -> Position

fn seek(&mut self, pos: Position) -> IoResult<()>

fn input(&mut self) -> IoResult<Cow<str>>

fn slice(&mut self, start: usize, end: usize) -> IoResult<Cow<str>>

fn quote(
    &mut self,
    from: Position,
    to: Position,
    lines_before: u32,
    lines_after: u32,
    message: Cow<str>
) -> Quote

Loading content...

Provided methods

fn slice_pos(&mut self, from: Position, to: Position) -> IoResult<Cow<str>>

fn reset(&mut self) -> IoResult<()>

Loading content...

Implementors

impl<'a> Reader for MemByteReader<'a>[src]

fn input(&mut self) -> IoResult<Cow<str>>[src]

will panic in debug if slice is not a valid utf8

fn slice(&mut self, start: usize, end: usize) -> IoResult<Cow<str>>[src]

will panic in debug if slice is not a valid utf8

impl<'a> Reader for MemCharReader<'a>[src]

fn input(&mut self) -> IoResult<Cow<str>>[src]

will panic in debug if slice is not a valid utf8

fn slice(&mut self, start: usize, end: usize) -> IoResult<Cow<str>>[src]

will panic in debug if slice is not a valid utf8

Loading content...