FormatOption

Struct FormatOption 

Source
pub struct FormatOption<'a> {
Show 16 fields pub keyword_case: &'a str, pub identifier_case: &'a str, pub output_format: &'a str, pub strip_comments: bool, pub use_space_around_operators: bool, pub strip_whitespace: bool, pub reindent: bool, pub indent_columns: bool, pub reindent_aligned: bool, pub indent_after_first: bool, pub indent_tabs: bool, pub indent_width: usize, pub indent_char: &'a str, pub wrap_after: usize, pub comma_first: bool, pub right_margin: usize, /* private fields */
}
Expand description

sql format options

Fields§

§keyword_case: &'a str

Changes how keywords are formatted. Allowed values are “upper”, “lower”.

§identifier_case: &'a str

Changes how identifiers are formatted. Allowed values are “upper”, “lower”.

§output_format: &'a str§strip_comments: bool

If True comments are removed from the statements.

§use_space_around_operators: bool

If True spaces are used around all operators.

§strip_whitespace: bool

if True extra spaces are removed.

§reindent: bool

If True the indentations of the statements are changed.

§indent_columns: bool§reindent_aligned: bool

If True the indentations of the statements are changed, and statements are aligned by keywords.

§indent_after_first: bool§indent_tabs: bool

If True tabs instead of spaces are used for indentation.

§indent_width: usize

The width of the indentation, defaults to 2.

§indent_char: &'a str

set indent char, defaults to 1 whitespace.

§wrap_after: usize

The column limit (in characters) for wrapping comma-separated lists. If unspecified, it puts every item in the list on its own line.

§comma_first: bool

If True comma-first notation for column names is used.

§right_margin: usize

Implementations§

Trait Implementations§

Source§

impl<'a> Default for FormatOption<'a>

Source§

fn default() -> FormatOption<'a>

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

Auto Trait Implementations§

§

impl<'a> Freeze for FormatOption<'a>

§

impl<'a> RefUnwindSafe for FormatOption<'a>

§

impl<'a> Send for FormatOption<'a>

§

impl<'a> Sync for FormatOption<'a>

§

impl<'a> Unpin for FormatOption<'a>

§

impl<'a> UnwindSafe for FormatOption<'a>

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, 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.