pub struct Input<'a> { /* private fields */ }
Expand description
An input source for the pretty printer.
Implementations§
source§impl<'a> Input<'a>
impl<'a> Input<'a>
sourcepub fn from_reader<R: Read + 'a>(reader: R) -> Self
pub fn from_reader<R: Read + 'a>(reader: R) -> Self
A new input from a reader.
sourcepub fn from_bytes(bytes: &'a [u8]) -> Self
pub fn from_bytes(bytes: &'a [u8]) -> Self
A new input from bytes.
sourcepub fn from_stdin() -> Self
pub fn from_stdin() -> Self
A new input from STDIN.
sourcepub fn name(self, name: impl AsRef<Path>) -> Self
pub fn name(self, name: impl AsRef<Path>) -> Self
The filename of the input. This affects syntax detection and changes the default header title.