pub struct GrpcQuery {
pub path: String,
pub data: Binary,
}Expand description
Queries the chain using a grpc query. This allows to query information that is not exposed in our API. The chain needs to allowlist the supported queries. The drawback of this query is that you have to handle the protobuf encoding and decoding yourself.
The returned data is protobuf encoded. The protobuf type depends on the query.
Because of this, using it with the query function will result
in a deserialization error.
Use raw_query or query_grpc
instead.
To find the path, as well as the request and response types, you can query the chain’s gRPC endpoint using a tool like grpcurl.
Fields§
§path: StringThe fully qualified endpoint path used for routing.
It follows the format /service_path/method_name,
eg. “/cosmos.authz.v1beta1.Query/Grants”
data: BinaryThe expected protobuf message type (not Any), binary encoded
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GrpcQuery
impl<'de> Deserialize<'de> for GrpcQuery
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl<C: CustomQuery> From<GrpcQuery> for QueryRequest<C>
impl<C: CustomQuery> From<GrpcQuery> for QueryRequest<C>
Source§impl JsonSchema for GrpcQuery
impl JsonSchema for GrpcQuery
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreimpl Eq for GrpcQuery
impl StructuralPartialEq for GrpcQuery
Auto Trait Implementations§
impl Freeze for GrpcQuery
impl RefUnwindSafe for GrpcQuery
impl Send for GrpcQuery
impl Sync for GrpcQuery
impl Unpin for GrpcQuery
impl UnwindSafe for GrpcQuery
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more