pub struct QueryContext {
pub context_type: QueryContextType,
pub object_type: String,
pub object_name: String,
pub start_index: i32,
pub stop_index: i32,
pub fragment: String,
pub call_site: String,
pub summary: String,
}Expand description
Query context describing where an error occurred.
Fields§
§context_type: QueryContextType§object_type: String§object_name: String§start_index: i32§stop_index: i32§fragment: String§call_site: String§summary: StringImplementations§
Source§impl QueryContext
impl QueryContext
Sourcepub fn new(
context_type: QueryContextType,
object_type: String,
object_name: String,
start_index: i32,
stop_index: i32,
fragment: String,
call_site: String,
summary: String,
) -> Self
pub fn new( context_type: QueryContextType, object_type: String, object_name: String, start_index: i32, stop_index: i32, fragment: String, call_site: String, summary: String, ) -> Self
Create a new QueryContext.
Sourcepub fn context_type(&self) -> QueryContextType
pub fn context_type(&self) -> QueryContextType
Get the context type.
Sourcepub fn object_type(&self) -> &str
pub fn object_type(&self) -> &str
Get the object type (e.g., “VIEW”, or empty string for main query).
Sourcepub fn object_name(&self) -> &str
pub fn object_name(&self) -> &str
Get the object name (e.g., view name, or empty string for main query).
Sourcepub fn start_index(&self) -> i32
pub fn start_index(&self) -> i32
Get the starting index in the query text (0-based).
Sourcepub fn stop_index(&self) -> i32
pub fn stop_index(&self) -> i32
Get the stopping index in the query text (0-based).
Trait Implementations§
Source§impl Clone for QueryContext
impl Clone for QueryContext
Source§fn clone(&self) -> QueryContext
fn clone(&self) -> QueryContext
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 moreAuto Trait Implementations§
impl Freeze for QueryContext
impl RefUnwindSafe for QueryContext
impl Send for QueryContext
impl Sync for QueryContext
impl Unpin for QueryContext
impl UnsafeUnpin for QueryContext
impl UnwindSafe for QueryContext
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> 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