Struct erg_common::config::Input
source · pub struct Input { /* private fields */ }
Expand description
Since input is not always only from files
Unify operations with Input
Implementations§
source§impl Input
impl Input
pub const fn new(kind: InputKind, id: u64) -> Self
pub fn file(path: PathBuf) -> Self
pub fn pipe(src: String) -> Self
pub fn str(src: String) -> Self
pub fn repl() -> Self
pub fn dummy() -> Self
pub fn dummy_repl(stdin: DummyStdin) -> Self
pub const fn is_repl(&self) -> bool
pub const fn id(&self) -> u64
pub fn path(&self) -> Option<&Path>
pub fn dir(&self) -> PathBuf
pub fn enclosed_name(&self) -> &str
pub fn lineno(&self) -> usize
pub fn block_begin(&self) -> usize
pub fn set_block_begin(&self)
pub fn insert_whitespace(&self, whitespace: &str)
pub fn set_indent(&self, indent: usize)
pub fn file_stem(&self) -> String
pub fn full_path(&self) -> PathBuf
pub fn filename(&self) -> String
pub fn unescaped_file_stem(&self) -> &str
pub fn unescaped_filename(&self) -> &str
pub fn unescaped_path(&self) -> &Path
pub fn read(&mut self) -> String
pub fn try_read(&mut self) -> Result<String>
pub fn read_non_dummy(&self) -> String
pub fn reread_lines(&self, ln_begin: usize, ln_end: usize) -> Vec<String>
pub fn reread(&self) -> String
pub fn local_resolve(&self, path: &Path) -> Result<PathBuf, Error>
pub fn local_decl_resolve(&self, path: &Path) -> Result<PathBuf, Error>
pub fn local_py_resolve(&self, path: &Path) -> Result<PathBuf, Error>
Trait Implementations§
source§impl PartialEq<Input> for Input
impl PartialEq<Input> for Input
impl Eq for Input
impl StructuralEq for Input
impl StructuralPartialEq for Input
Auto Trait Implementations§
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