Struct Args

Source
pub struct Args {
Show 18 fields pub check: bool, pub print: bool, pub fail_on_change: bool, pub wrap: bool, pub wraplen: u8, pub wrapmin: u8, pub tabsize: u8, pub tabchar: TabChar, pub stdin: bool, pub config: Option<PathBuf>, pub lists: Vec<String>, pub verbatims: Vec<String>, pub no_indent_envs: Vec<String>, pub wrap_chars: Vec<char>, pub verbosity: LevelFilter, pub arguments: bool, pub files: Vec<PathBuf>, pub recursive: bool,
}
Expand description

Arguments passed to tex-fmt

Fields§

§check: bool

Check formatting, do not modify files

§print: bool

Print to stdout, do not modify files

§fail_on_change: bool

Return non-0 exit code when modifying files

§wrap: bool

Wrap long lines

§wraplen: u8

Maximum allowed line length

§wrapmin: u8

Wrap lines longer than this

§tabsize: u8

Number of characters to use as tab size

§tabchar: TabChar

Characters to use for indentation

§stdin: bool

Read from stdin and output to stdout

§config: Option<PathBuf>

Path to config file

§lists: Vec<String>

Extra list environments

§verbatims: Vec<String>

Extra verbatim environments

§no_indent_envs: Vec<String>

Environments which are not indented

§wrap_chars: Vec<char>

Characters after which lines can be wrapped

§verbosity: LevelFilter

Verbosity level for log messages

§arguments: bool

Print arguments and exit

§files: Vec<PathBuf>

List of files to be formatted

§recursive: bool

Recursive search for files

Implementations§

Source§

impl Args

Source

pub fn from(args: OptionArgs) -> Self

Construct concrete arguments from optional arguments

§Panics

This function panics when called on OptionArgs with None fields. However this should never happen as merging in OptionArgs::default() should overwrite any None fields.

Source

pub fn resolve(&mut self, logs: &mut Vec<Log>) -> u8

Resolve conflicting arguments

Trait Implementations§

Source§

impl Debug for Args

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Args

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Display for Args

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Args

§

impl RefUnwindSafe for Args

§

impl Send for Args

§

impl Sync for Args

§

impl Unpin for Args

§

impl UnwindSafe for Args

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.