pub struct Format<'a> {
pub indent: &'a [u8],
pub newline: &'a [u8],
pub space: &'a [u8],
}Expand description
How a document is laid out when it is written as text.
All three are empty by default, which is one line and no spaces, and that is
what JSON.GET answers when the client did not ask for anything else. The
three are Redis’s INDENT, NEWLINE and SPACE, and they are strings
rather than counts there, so they are strings here.
Fields§
§indent: &'a [u8]Written once per level of nesting at the start of a line.
newline: &'a [u8]Written at the end of a line.
space: &'a [u8]Written after the colon between a key and its value.
Implementations§
Source§impl Format<'_>
impl Format<'_>
Sourcepub fn is_plain(&self) -> bool
pub fn is_plain(&self) -> bool
Whether this asks for anything at all.
A container with nothing in it is written as {} either way, so the
laid out form only differs from the compact one where there is something
to lay out. JSON.GET builds its own wrapper around what a path matched
and has to make the same decision about it, which is why this is public.