Struct rustfmt_nightly::Session [−][src]
pub struct Session<'b, T: Write + 'b> { pub config: Config, pub out: Option<&'b mut T>, // some fields omitted }
A session is a run of rustfmt across a single or multiple inputs.
Fields
config: Config
out: Option<&'b mut T>
Methods
impl<'b, T: Write + 'b> Session<'b, T>
[src]
impl<'b, T: Write + 'b> Session<'b, T>
pub fn new(config: Config, out: Option<&'b mut T>) -> Session<'b, T>
[src]
pub fn new(config: Config, out: Option<&'b mut T>) -> Session<'b, T>
pub fn format(&mut self, input: Input) -> Result<FormatReport, ErrorKind>
[src]
pub fn format(&mut self, input: Input) -> Result<FormatReport, ErrorKind>
The main entry point for Rustfmt. Formats the given input according to the
given config. out
is only necessary if required by the configuration.
pub fn override_config<F, U>(&mut self, config: Config, f: F) -> U where
F: FnOnce(&mut Session<'b, T>) -> U,
[src]
pub fn override_config<F, U>(&mut self, config: Config, f: F) -> U where
F: FnOnce(&mut Session<'b, T>) -> U,
pub fn add_operational_error(&mut self)
[src]
pub fn add_operational_error(&mut self)
pub fn has_operational_errors(&self) -> bool
[src]
pub fn has_operational_errors(&self) -> bool
pub fn has_parsing_errors(&self) -> bool
[src]
pub fn has_parsing_errors(&self) -> bool
pub fn has_formatting_errors(&self) -> bool
[src]
pub fn has_formatting_errors(&self) -> bool
pub fn has_check_errors(&self) -> bool
[src]
pub fn has_check_errors(&self) -> bool
pub fn has_diff(&self) -> bool
[src]
pub fn has_diff(&self) -> bool
pub fn has_no_errors(&self) -> bool
[src]
pub fn has_no_errors(&self) -> bool