Skip to main content

StatusExt

Trait StatusExt 

Source
pub trait StatusExt: Borrow<Status> {
    // Required methods
    fn is_rejection(&self) -> bool;
    fn not_found<T: FromHex>(&self) -> Option<Vec<T>>;
    fn rejected_vtxos(&self) -> Vec<VtxoId>;
}
Expand description

Extension trait for tonic::Status

Required Methods§

Source

fn is_rejection(&self) -> bool

Whether the server rejected the request and no state has changed

Source

fn not_found<T: FromHex>(&self) -> Option<Vec<T>>

Get any not-found identifiers

Source

fn rejected_vtxos(&self) -> Vec<VtxoId>

The VTXO ids the server flagged as the reason it rejected the request.

Returns an empty vec when the status is not a rejection, carries no identifiers (e.g. an older server), or none of them parse as a vtxo id.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl StatusExt for Status

Implementors§