The QtGrpc namespace contains miscellaneous identifiers used throughout the QtGrpc library. 更多...
| 头: |
#include <QtGrpcNamespace>
|
| CMake: |
find_package(Qt6 REQUIRED COMPONENTS Grpc)
target_link_libraries(mytarget PRIVATE Qt6::Grpc)
|
| Since: | Qt 6.5 |
| 枚举类 | SerializationFormat { Default, Protobuf, Json } |
| 枚举类 | StatusCode { Ok, Cancelled, InvalidArgument, DeadlineExceeded, NotFound, …, Unauthenticated } |
Contains preset values for setting the protobuf serializer format.
| 常量 | 值 | 描述 |
|---|---|---|
QtGrpc::SerializationFormat::Default
|
0
|
默认 QGrpcSerializationFormat preset. This preset constructs a QProtobufSerializer with an empty content type suffix. |
QtGrpc::SerializationFormat::Protobuf
|
1
|
The embedded protobuf
QGrpcSerializationFormat
preset. This preset constructs a
QProtobufSerializer
采用
proto
content type suffix.
|
QtGrpc::SerializationFormat::Json
|
2
|
The embedded JSON
QGrpcSerializationFormat
preset. This preset constructs a
QProtobufJsonSerializer
采用
json
content type suffix.
|
另请参阅 QGrpcSerializationFormat .
Channel's status codes.
| 常量 | 值 | 描述 |
|---|---|---|
QtGrpc::StatusCode::Ok
|
0
|
没有错误 |
QtGrpc::StatusCode::Cancelled
|
1
|
The operation was cancelled, typically by the caller. |
QtGrpc::StatusCode::InvalidArgument
|
3
|
The client specified an invalid argument, |
QtGrpc::StatusCode::DeadlineExceeded
|
4
|
The deadline expired before the operation could complete, |
QtGrpc::StatusCode::NotFound
|
5
|
Some requested entity (e.g., file or directory) was not found. |
QtGrpc::StatusCode::AlreadyExists
|
6
|
The entity that a client attempted to create (e.g., file or directory) already exists. |
QtGrpc::StatusCode::PermissionDenied
|
7
|
The caller does not have permission to execute the specified operation.
PermissionDenied
must not be used for rejections caused by exhausting some resource (use
ResourceExhausted
instead for those errors).
PermissionDenied
must not be used if the caller can not be identified (use
Unauthenticated
instead for those errors). This error code does not imply the request is valid or the requested entity exists or satisfies other pre-conditions.
|
QtGrpc::StatusCode::ResourceExhausted
|
8
|
Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system is out of space. |
QtGrpc::StatusCode::FailedPrecondition
|
9
|
The operation was rejected because the system is not in a state required for the operation's execution. |
QtGrpc::StatusCode::Aborted
|
10
|
The operation was aborted, typically due to a concurrency issue such as a sequencer check failure or transaction abort. |
QtGrpc::StatusCode::OutOfRange
|
11
|
The operation was attempted past the valid range. |
QtGrpc::StatusCode::Unimplemented
|
12
|
The operation is not implemented or is not supported/enabled in this service. |
QtGrpc::StatusCode::Internal
|
13
|
This means that some invariants expected by the underlying system have been broken. |
QtGrpc::StatusCode::Unavailable
|
14
|
The service is currently unavailable. This is most likely a transient condition, which can be corrected by retrying with a backoff. Note that it is not always safe to retry non-idempotent operations. |
QtGrpc::StatusCode::DataLoss
|
15
|
Unrecoverable data loss or corruption. |
QtGrpc::StatusCode::Unauthenticated
|
16
|
The request does not have valid authentication credentials for the operation. |
另请参阅 gRPC status codes .