pub struct Config {
pub curly_brackets_style: ContentStyle,
pub square_brackets_style: ContentStyle,
pub key_style: ContentStyle,
pub string_value_style: ContentStyle,
pub number_value_style: ContentStyle,
pub boolean_value_style: ContentStyle,
pub null_value_style: ContentStyle,
pub active_item_attribute: Attribute,
pub inactive_item_attribute: Attribute,
pub indent: usize,
pub overflow_mode: OverflowMode,
pub lines: Option<usize>,
}Available on crate feature
jsonstream only.Fields§
§curly_brackets_style: ContentStyleStyle for {}.
square_brackets_style: ContentStyleStyle for [].
key_style: ContentStyleStyle for “key”.
string_value_style: ContentStyleStyle for string values.
number_value_style: ContentStyleStyle for number values.
boolean_value_style: ContentStyleStyle for boolean values.
null_value_style: ContentStyleStyle for null values.
active_item_attribute: AttributeAttribute for the selected line.
inactive_item_attribute: AttributeAttribute for unselected lines.
indent: usizeThe number of spaces used for indentation in the rendered JSON structure.
This value multiplies with the indentation level of a JSON element to determine
the total indentation space. For example, an indent value of 4 means each
indentation level will be 4 spaces wide.
overflow_mode: OverflowModeRendering behavior when a line exceeds the terminal width.
lines: Option<usize>Number of lines available for rendering.
Implementations§
Source§impl Config
impl Config
Sourcepub fn format_for_terminal_display(
&self,
rows: &[Row],
width: u16,
) -> Vec<StyledGraphemes>
pub fn format_for_terminal_display( &self, rows: &[Row], width: u16, ) -> Vec<StyledGraphemes>
Formats a Vec
Sourcepub fn format_raw_json(&self, rows: &[Row]) -> String
pub fn format_raw_json(&self, rows: &[Row]) -> String
Formats a slice of Rows to a raw JSON string, ignoring collapsed and truncated states
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
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
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more