Struct mz_sql_parser::ast::display::AstFormatter
source · pub struct AstFormatter<W> {
buf: W,
mode: FormatMode,
}
Fields§
§buf: W
§mode: FormatMode
Implementations§
source§impl<W> AstFormatter<W>where
W: Write,
impl<W> AstFormatter<W>where
W: Write,
pub fn write_node<T: AstDisplay>(&mut self, s: &T)
pub fn write_str<T: Display>(&mut self, s: T)
pub fn stable(&self) -> bool
sourcepub fn simple(&self) -> bool
pub fn simple(&self) -> bool
Whether the AST should be printed out in a more human readable format.
sourcepub fn unredact(&mut self) -> FormatMode
pub fn unredact(&mut self) -> FormatMode
Sets the current mode to a compatible version that does not redact
values; returns the current mode, which should be reset when the
unredacted printing is complete using Self::set_mode
.
Note that this is the simplest means of unredacting values opt-out rather than opt-in. We must monitor usage of this API carefully to ensure we don’t end up leaking values.
pub fn set_mode(&mut self, mode: FormatMode)
pub fn new(buf: W, mode: FormatMode) -> Self
Trait Implementations§
Auto Trait Implementations§
impl<W> Freeze for AstFormatter<W>where
W: Freeze,
impl<W> RefUnwindSafe for AstFormatter<W>where
W: RefUnwindSafe,
impl<W> Send for AstFormatter<W>where
W: Send,
impl<W> Sync for AstFormatter<W>where
W: Sync,
impl<W> Unpin for AstFormatter<W>where
W: Unpin,
impl<W> UnwindSafe for AstFormatter<W>where
W: 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> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request