在本页

QtGrpc::RpcDescriptor Struct

struct QtGrpc::RpcDescriptor

用服务名称、方法名称和 RPC 类型描述 gRPC 方法。更多

头文件: #include <QtGrpcNamespace>
CMake: find_package(Qt6 REQUIRED COMPONENTS Grpc)
target_link_libraries(mytarget PRIVATE Qt6::Grpc)
Qt 6.11

此结构具有强可比性

公共变量

QLatin1StringView method
QLatin1StringView service
QtGrpc::RpcType type
size_t qHash(const QtGrpc::RpcDescriptor &key, size_t seed = 0)
QDebug operator<<(QDebug debug, const QtGrpc::RpcDescriptor &description)

详细描述

RpcDescriptor 结构用于保存启动和描述 RPC 调用的 gRPC 方法的标识信息。它允许QtGrpc 将每个操作与其服务、方法和通信模式相关联。

另请参阅 QtGrpc::RpcType

成员变量文档

QLatin1StringView RpcDescriptor::method

服务中 gRPC 方法的名称。

QLatin1StringView RpcDescriptor::service

该方法所属 gRPC 服务的名称。

QtGrpc::RpcType RpcDescriptor::type

QtGrpc::RpcType 所定义的 RPC 类型。

相关非会员

[constexpr noexcept] size_t qHash(const QtGrpc::RpcDescriptor &key, size_t seed = 0)

返回key 的哈希值,使用seed 作为计算的种子。

QDebug operator<<(QDebug debug, const QtGrpc::RpcDescriptor &description)

description 写入指定的数据流debug

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.