[−][src]Struct dprint_core::plugins::Formatter
A formatter constructed from a collection of plugins.
Implementations
impl Formatter
[src]
pub fn new(plugins: Vec<Box<dyn Plugin>>) -> Formatter
[src]
Creates a new formatter
pub fn iter_plugins(&self) -> Iter<Box<dyn Plugin>>
[src]
Iterates over the plugins.
pub fn iter_plugins_mut(&mut self) -> IterMut<Box<dyn Plugin>>
[src]
Iterates over the plugins with a mutable iterator.
pub fn format_text(
&self,
file_path: &PathBuf,
file_text: &str
) -> Result<Option<String>, String>
[src]
&self,
file_path: &PathBuf,
file_text: &str
) -> Result<Option<String>, String>
Formats the file text with one of the plugins.
Returns the string when a plugin formatted or error. Otherwise None when no plugin was found.
Auto Trait Implementations
impl !RefUnwindSafe for Formatter
impl !Send for Formatter
impl Sync for Formatter
impl Unpin for Formatter
impl !UnwindSafe for Formatter
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,