pub struct Operation(/* private fields */);Expand description
Represents a potentially long-running operation that can be used by Google Cloud to group log entries.
Created automatically by SpanExt::operation.
Implementations§
Source§impl Operation
impl Operation
Sourcepub fn init(&self, info: OperationInfo) -> &Self
pub fn init(&self, info: OperationInfo) -> &Self
Updates the details within this operation. You should really only call this once.
After initializing, the first event will have the operation attached
with the first attribute set to true. Subsequent events will not
have this attribute.
To indicate that you are done operating, see Operation::end.
Sourcepub fn import(&self, info: OperationInfo) -> &Self
pub fn import(&self, info: OperationInfo) -> &Self
Imports operation info that has already been started. The only
difference between this method and Operation::init is the first event
will not have a first attribute.
Sourcepub fn export(&self) -> OperationInfo
pub fn export(&self) -> OperationInfo
Returns a copy of this operations info that can be passed to other programs. OperationInfo implements Serialize and Deserialize to allow passing them safely.