pub struct FormatPreferences {
pub rules: Vec<String>,
pub exclude_rules: Vec<String>,
pub max_line_length: usize,
pub indent_unit: IndentUnit,
pub tab_space_size: usize,
pub keyword_case: KeywordCase,
pub comma_position: CommaPosition,
}Expand description
Formatting preferences (the reference’s sqlfluff settings).
Fields§
§rules: Vec<String>Rule codes or group names to apply (LT01, layout, capitalisation.keywords).
exclude_rules: Vec<String>Rule codes or names to skip even when selected.
max_line_length: usize§indent_unit: IndentUnit§tab_space_size: usize§keyword_case: KeywordCase§comma_position: CommaPositionImplementations§
Source§impl FormatPreferences
impl FormatPreferences
Sourcepub fn to_json(&self) -> Value
pub fn to_json(&self) -> Value
The preferences as JSON (the shape parse_preferences reads).
Sourcepub fn from_yaml(text: &str) -> Result<Self>
pub fn from_yaml(text: &str) -> Result<Self>
Preferences from YAML (validated like parse_preferences).
Trait Implementations§
Source§impl Clone for FormatPreferences
impl Clone for FormatPreferences
Source§impl Debug for FormatPreferences
impl Debug for FormatPreferences
Source§impl Default for FormatPreferences
impl Default for FormatPreferences
Source§impl<'de> Deserialize<'de> for FormatPreferences
impl<'de> Deserialize<'de> for FormatPreferences
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for FormatPreferences
Source§impl PartialEq for FormatPreferences
impl PartialEq for FormatPreferences
Source§impl Serialize for FormatPreferences
impl Serialize for FormatPreferences
impl StructuralPartialEq for FormatPreferences
Auto Trait Implementations§
impl Forget for FormatPreferences
impl Freeze for FormatPreferences
impl Move for FormatPreferences
impl RefUnwindSafe for FormatPreferences
impl Send for FormatPreferenceswhere
RawVecInner: Send,
impl Sync for FormatPreferenceswhere
RawVecInner: Sync,
impl Unpin for FormatPreferences
impl UnsafeUnpin for FormatPreferences
impl UnwindSafe for FormatPreferenceswhere
RawVecInner: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.