pub struct Input(/* private fields */);
Implementations§
Source§impl Input
impl Input
pub fn exists(&self) -> bool
pub fn is_file(&self) -> bool
pub fn is_directory(&self) -> bool
pub fn path(&self) -> &Path
pub fn filename(&self) -> FileName
pub fn into_arc_source(&self, strict: bool) -> Result<ArcSource>
pub fn into_source(&self, strict: bool) -> Result<Source<'static>>
pub fn get_file_types(&self, file_types: &[String]) -> Result<Vec<Input>, Error>
pub fn glob(&self, pattern: &str) -> Result<Vec<Input>, Error>
pub fn open(&self) -> Result<impl BufRead>
pub fn read_to_string(&self, strict: bool) -> Result<String>
Trait Implementations§
impl Eq for Input
impl StructuralPartialEq for Input
Auto Trait Implementations§
impl Freeze for Input
impl RefUnwindSafe for Input
impl Send for Input
impl Sync for Input
impl Unpin for Input
impl UnwindSafe for Input
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more