Struct mz_sqllogictest::runner::RewriteBuffer
source · Expand description
Provides a means to rewrite the .slt
file while iterating over it.
This struct takes the slt file as its input
, tracks a cursor into it
(input_offset
), and provides a buffe (output
) to store the rewritten
results.
Functions that modify the file will lazily move input
into output
using
flush_to
. However, those calls should all be interior to other functions.
Fields§
§input: &'a str
§input_offset: usize
§output: String
Implementations§
source§impl<'a> RewriteBuffer<'a>
impl<'a> RewriteBuffer<'a>
fn new(input: &'a str) -> RewriteBuffer<'a>
fn flush_to(&mut self, offset: usize)
fn skip_to(&mut self, offset: usize)
fn append(&mut self, s: &str)
fn append_header(&mut self, input: &String, expected_output: &str)
fn rewrite_expected_error(
&mut self,
input: &String,
old_err: &str,
new_err: &str,
query: &str
)
fn peek_last(&self, n: usize) -> &str
fn finish(self) -> String
Trait Implementations§
Auto Trait Implementations§
impl<'a> RefUnwindSafe for RewriteBuffer<'a>
impl<'a> Send for RewriteBuffer<'a>
impl<'a> Sync for RewriteBuffer<'a>
impl<'a> Unpin for RewriteBuffer<'a>
impl<'a> UnwindSafe for RewriteBuffer<'a>
Blanket Implementations§
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
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
source§fn into_rust(self) -> Result<R, TryFromProtoError>
fn into_rust(self) -> Result<R, TryFromProtoError>
See
RustType::from_proto
.source§fn from_rust(rust: &R) -> P
fn from_rust(rust: &R) -> P
See
RustType::into_proto
.