Struct pear::StringFile
source · [−]pub struct StringFile<'s> { /* private fields */ }
Implementations
sourceimpl<'s> StringFile<'s>
impl<'s> StringFile<'s>
pub fn open(path: &str) -> Result<StringFile<'s>>
pub fn open_with_cap(path: &str, cap: usize) -> Result<StringFile<'s>>
pub fn new(file: File, cap: usize) -> StringFile<'s>
pub fn available(&self) -> usize
Trait Implementations
sourceimpl<'s> Debug for StringFile<'s>
impl<'s> Debug for StringFile<'s>
sourceimpl<'s> Input for StringFile<'s>
impl<'s> Input for StringFile<'s>
type Token = char
type InSlice = &'s str
type Slice = &'s str
type Many = String
type Context = &'s str
fn peek(&mut self) -> Option<Self::Token>
fn take_many<F: FnMut(Self::Token) -> bool>(&mut self, cond: F) -> Self::Many
fn skip_many<F: FnMut(Self::Token) -> bool>(&mut self, cond: F) -> usize
fn peek_slice(&mut self, slice: Self::InSlice) -> Option<Self::Slice>
fn advance(&mut self, count: usize)
fn is_empty(&mut self) -> bool
fn context(&mut self) -> Option<Self::Context>
Auto Trait Implementations
impl<'s> RefUnwindSafe for StringFile<'s>
impl<'s> Send for StringFile<'s>
impl<'s> Sync for StringFile<'s>
impl<'s> Unpin for StringFile<'s>
impl<'s> UnwindSafe for StringFile<'s>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more