Enum nbio::PublishOutcome
source · pub enum PublishOutcome<T> {
Published,
Incomplete(T),
}
Expand description
Returned by the Publish::publish
function, providing the outcome of the publish action.
The generic type T
will match the cooresponding Publish::PublishPayload
.
Variants§
Published
The publish action completed fully
Incomplete(T)
The publish action was not performed or was partially performed.
The returned reference must be passed back into the Publish::publish
function for the publish action to complete.
Whether or not the returned reference may consist of partial data depends on the Session
implementation.
If you are looking for a general retry pattern, it is always safe to finish the publish by passing this returned
reference back into the publish
function for another attempt, but it is only sometimes appropriate to return the entire
original publish reference into the publish
function for a second attempt.