Struct google_api_proto::google::monitoring::v3::TextLocator
source · pub struct TextLocator {
pub source: String,
pub start_position: Option<Position>,
pub end_position: Option<Position>,
pub nested_locator: Option<Box<TextLocator>>,
pub nesting_reason: String,
}
Expand description
A locator for text. Indicates a particular part of the text of a request or of an object referenced in the request.
For example, suppose the request field text
contains:
text: “The quick brown fox jumps over the lazy dog.”
Then the locator:
source: “text” start_position { line: 1 column: 17 } end_position { line: 1 column: 19 }
refers to the part of the text: “fox”.
Fields§
§source: String
The source of the text. The source may be a field in the request, in which case its format is the format of the google.rpc.BadRequest.FieldViolation.field field in https://cloud.google.com/apis/design/errors#error_details. It may also be be a source other than the request field (e.g. a macro definition referenced in the text of the query), in which case this is the name of the source (e.g. the macro name).
start_position: Option<Position>
The position of the first byte within the text.
end_position: Option<Position>
The position of the last byte within the text.
nested_locator: Option<Box<TextLocator>>
If source
, start_position
, and end_position
describe a call on
some object (e.g. a macro in the time series query language text) and a
location is to be designated in that object’s text, nested_locator
identifies the location within that object.
nesting_reason: String
When nested_locator
is set, this field gives the reason for the nesting.
Usually, the reason is a macro invocation. In that case, the macro name
(including the leading ‘@’) signals the location of the macro call
in the text and a macro argument name (including the leading ‘$’) signals
the location of the macro argument inside the macro body that got
substituted away.
Trait Implementations§
source§impl Clone for TextLocator
impl Clone for TextLocator
source§fn clone(&self) -> TextLocator
fn clone(&self) -> TextLocator
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for TextLocator
impl Debug for TextLocator
source§impl Default for TextLocator
impl Default for TextLocator
source§impl Message for TextLocator
impl Message for TextLocator
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for TextLocator
impl PartialEq for TextLocator
source§fn eq(&self, other: &TextLocator) -> bool
fn eq(&self, other: &TextLocator) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for TextLocator
Auto Trait Implementations§
impl Freeze for TextLocator
impl RefUnwindSafe for TextLocator
impl Send for TextLocator
impl Sync for TextLocator
impl Unpin for TextLocator
impl UnwindSafe for TextLocator
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
T
in a tonic::Request