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.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Input<'a>
impl<'a> !Send for Input<'a>
impl<'a> !Sync for Input<'a>
impl<'a> Unpin for Input<'a>
impl<'a> !UnwindSafe for Input<'a>
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