Struct ql2::Response [−][src]
You get back a response with the same [token] as your query.
Fields
type: Option<i32>
error_type: Option<i32>
notes: Vec<i32>
token: Option<i64>
Indicates what Query this response corresponds to.
response: Vec<Datum>
response contains 1 RQL datum if [type] is [SUCCESS_ATOM] or [SERVER_INFO]. response contains many RQL data if [type] is [SUCCESS_SEQUENCE] or [SUCCESS_PARTIAL]. response contains 1 error message (of type [R_STR]) in all other cases.
backtrace: Option<Backtrace>
If [type] is [CLIENT_ERROR], [TYPE_ERROR], or [RUNTIME_ERROR], then a backtrace will be provided. The backtrace says where in the query the error occurred. Ideally this information will be presented to the user as a pretty-printed version of their query with the erroneous section underlined. A backtrace is a series of 0 or more Frames, each of which specifies either the index of a positional argument or the name of an optional argument. (Those words will make more sense if you look at the Term message below.)
Contains n Frames when you get back an error.
profile: Option<Datum>
If the [global_optargs] in the Query that this Response is a response to contains a key “profile” which maps to a static value of true then [profile] will contain a Datum which provides profiling information about the execution of the query. This field should be returned to the user along with the result that would normally be returned (a datum or a cursor). In official drivers this is accomplished by putting them inside of an object with “value” mapping to the return value and “profile” mapping to the profile object.
Implementations
impl Response
[src]
pub fn type(&self) -> ResponseType
[src]
Returns the enum value of type
, or the default if the field is unset or set to an invalid enum value.
pub fn set_type(&mut self, value: ResponseType)
[src]
Sets type
to the provided enum value.
pub fn token(&self) -> i64
[src]
Returns the value of token
, or the default value if token
is unset.
pub fn notes(
&self
) -> FilterMap<Cloned<Iter<'_, i32>>, fn(_: i32) -> Option<ResponseNote>>
[src]
&self
) -> FilterMap<Cloned<Iter<'_, i32>>, fn(_: i32) -> Option<ResponseNote>>
Returns an iterator which yields the valid enum values contained in notes
.
pub fn push_notes(&mut self, value: ResponseNote)
[src]
Appends the provided enum value to notes
.
pub fn error_type(&self) -> ErrorType
[src]
Returns the enum value of error_type
, or the default if the field is unset or set to an invalid enum value.
pub fn set_error_type(&mut self, value: ErrorType)
[src]
Sets error_type
to the provided enum value.
Trait Implementations
impl Clone for Response
[src]
impl Debug for Response
[src]
impl Default for Response
[src]
impl<'de> Deserialize<'de> for Response
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Message for Response
[src]
fn encode_raw<B>(&self, buf: &mut B) where
B: BufMut,
[src]
B: BufMut,
fn merge_field<B>(
&mut self,
tag: u32,
wire_type: WireType,
buf: &mut B,
ctx: DecodeContext
) -> Result<(), DecodeError> where
B: Buf,
[src]
&mut self,
tag: u32,
wire_type: WireType,
buf: &mut B,
ctx: DecodeContext
) -> Result<(), DecodeError> where
B: Buf,
fn encoded_len(&self) -> usize
[src]
fn clear(&mut self)
[src]
pub fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError> where
B: BufMut,
[src]
B: BufMut,
pub fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError> where
B: BufMut,
[src]
B: BufMut,
pub fn decode<B>(buf: B) -> Result<Self, DecodeError> where
Self: Default,
B: Buf,
[src]
Self: Default,
B: Buf,
pub fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError> where
Self: Default,
B: Buf,
[src]
Self: Default,
B: Buf,
pub fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError> where
B: Buf,
[src]
B: Buf,
pub fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError> where
B: Buf,
[src]
B: Buf,
impl PartialEq<Response> for Response
[src]
impl Serialize for Response
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralPartialEq for Response
[src]
Auto Trait Implementations
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,