[−][src]Struct git_checks::builders::FormattingBuilder
Builder for Formatting
.
Implementations
impl FormattingBuilder
[src]
pub fn name<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
[src]
The "name" of the formatter.
This is used to refer to the formatter in use in error messages.
Configuration: Optional
Default: the kind
is used
pub fn kind<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
[src]
The "kind" of formatting being performed.
This is used in the name of the attribute which uses this check.
Configuration: Required
pub fn formatter<VALUE: Into<PathBuf>>(&mut self, value: VALUE) -> &mut Self
[src]
The path to the formatter.
This may be a command that exists in PATH
if absolute paths are not wanted.
Configuration: Required
pub fn fix_message<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
[src]
A message to add when failures occur.
Projects which check formatting may have a way to fix it automatically. This is here so that those projects can mention their specific instructions.
Configuration: Optional Default: Unused if not provided.
pub fn timeout<VALUE: Into<Duration>>(&mut self, value: VALUE) -> &mut Self
[src]
A timeout for running the formatter.
If the formatter exceeds this timeout, it is considered to have failed.
Configuration: Optional Default: No timeout
pub fn build(&self) -> Result<Formatting, String>
[src]
impl FormattingBuilder
[src]
pub fn config_files<I, F>(&mut self, files: I) -> &mut Self where
I: IntoIterator<Item = F>,
F: Into<String>,
[src]
I: IntoIterator<Item = F>,
F: Into<String>,
Configuration files within the repository the formatter
Configuration: Optional
Default: Vec::new()
Trait Implementations
impl Clone for FormattingBuilder
[src]
fn clone(&self) -> FormattingBuilder
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for FormattingBuilder
[src]
fn default() -> FormattingBuilder
[src]
Auto Trait Implementations
impl RefUnwindSafe for FormattingBuilder
impl Send for FormattingBuilder
impl Sync for FormattingBuilder
impl Unpin for FormattingBuilder
impl UnwindSafe for FormattingBuilder
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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>,