#[non_exhaustive]pub struct OperationInfo {
pub response_type: String,
pub metadata_type: String,
/* private fields */
}Expand description
A message representing the message types used by a long-running operation.
Example:
rpc Export(ExportRequest) returns (google.longrunning.Operation) {
option (google.longrunning.operation_info) = {
response_type: "ExportResponse"
metadata_type: "ExportMetadata"
};
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.response_type: StringRequired. The message name of the primary return type for this long-running operation. This type will be used to deserialize the LRO’s response.
If the response is in a different package from the rpc, a fully-qualified
message name must be used (e.g. google.protobuf.Struct).
Note: Altering this value constitutes a breaking change.
metadata_type: StringRequired. The message name of the metadata type for this long-running operation.
If the response is in a different package from the rpc, a fully-qualified
message name must be used (e.g. google.protobuf.Struct).
Note: Altering this value constitutes a breaking change.
Implementations§
Source§impl OperationInfo
impl OperationInfo
pub fn new() -> Self
Sourcepub fn set_response_type<T: Into<String>>(self, v: T) -> Self
pub fn set_response_type<T: Into<String>>(self, v: T) -> Self
Sets the value of response_type.
Sourcepub fn set_metadata_type<T: Into<String>>(self, v: T) -> Self
pub fn set_metadata_type<T: Into<String>>(self, v: T) -> Self
Sets the value of metadata_type.
Trait Implementations§
Source§impl Clone for OperationInfo
impl Clone for OperationInfo
Source§fn clone(&self) -> OperationInfo
fn clone(&self) -> OperationInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OperationInfo
impl Debug for OperationInfo
Source§impl Default for OperationInfo
impl Default for OperationInfo
Source§fn default() -> OperationInfo
fn default() -> OperationInfo
Returns the “default value” for a type. Read more
Source§impl Message for OperationInfo
impl Message for OperationInfo
Source§impl PartialEq for OperationInfo
impl PartialEq for OperationInfo
impl StructuralPartialEq for OperationInfo
Auto Trait Implementations§
impl Freeze for OperationInfo
impl RefUnwindSafe for OperationInfo
impl Send for OperationInfo
impl Sync for OperationInfo
impl Unpin for OperationInfo
impl UnwindSafe for OperationInfo
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
Mutably borrows from an owned value. Read more