#[non_exhaustive]pub struct ScriptStackFrame {
pub start_line: i32,
pub start_column: i32,
pub end_line: i32,
pub end_column: i32,
pub procedure_id: String,
pub text: String,
/* private fields */
}Expand description
Represents the location of the statement/expression being evaluated. Line and column numbers are defined as follows:
- Line and column numbers start with one. That is, line 1 column 1 denotes the start of the script.
- When inside a stored procedure, all line/column numbers are relative to the procedure body, not the script in which the procedure was defined.
- Start/end positions exclude leading/trailing comments and whitespace. The end position always ends with a “;”, when present.
- Multi-byte Unicode characters are treated as just one column.
- If the original script (or procedure definition) contains TAB characters, a tab “snaps” the indentation forward to the nearest multiple of 8 characters, plus 1. For example, a TAB on column 1, 2, 3, 4, 5, 6 , or 8 will advance the next character to column 9. A TAB on column 9, 10, 11, 12, 13, 14, 15, or 16 will advance the next character to column 17.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.start_line: i32Output only. One-based start line.
start_column: i32Output only. One-based start column.
end_line: i32Output only. One-based end line.
end_column: i32Output only. One-based end column.
procedure_id: StringOutput only. Name of the active procedure, empty if in a top-level script.
text: StringOutput only. Text of the current statement/expression.
Implementations§
Source§impl ScriptStackFrame
impl ScriptStackFrame
Sourcepub fn set_start_line<T: Into<i32>>(self, v: T) -> Self
pub fn set_start_line<T: Into<i32>>(self, v: T) -> Self
Sourcepub fn set_start_column<T: Into<i32>>(self, v: T) -> Self
pub fn set_start_column<T: Into<i32>>(self, v: T) -> Self
Sourcepub fn set_end_line<T: Into<i32>>(self, v: T) -> Self
pub fn set_end_line<T: Into<i32>>(self, v: T) -> Self
Sourcepub fn set_end_column<T: Into<i32>>(self, v: T) -> Self
pub fn set_end_column<T: Into<i32>>(self, v: T) -> Self
Sourcepub fn set_procedure_id<T: Into<String>>(self, v: T) -> Self
pub fn set_procedure_id<T: Into<String>>(self, v: T) -> Self
Sets the value of procedure_id.
§Example
ⓘ
let x = ScriptStackFrame::new().set_procedure_id("example");Trait Implementations§
Source§impl Clone for ScriptStackFrame
impl Clone for ScriptStackFrame
Source§fn clone(&self) -> ScriptStackFrame
fn clone(&self) -> ScriptStackFrame
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ScriptStackFrame
impl Debug for ScriptStackFrame
Source§impl Default for ScriptStackFrame
impl Default for ScriptStackFrame
Source§fn default() -> ScriptStackFrame
fn default() -> ScriptStackFrame
Returns the “default value” for a type. Read more
Source§impl Message for ScriptStackFrame
impl Message for ScriptStackFrame
Source§impl PartialEq for ScriptStackFrame
impl PartialEq for ScriptStackFrame
impl StructuralPartialEq for ScriptStackFrame
Auto Trait Implementations§
impl Freeze for ScriptStackFrame
impl RefUnwindSafe for ScriptStackFrame
impl Send for ScriptStackFrame
impl Sync for ScriptStackFrame
impl Unpin for ScriptStackFrame
impl UnsafeUnpin for ScriptStackFrame
impl UnwindSafe for ScriptStackFrame
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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<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