Trait Map

Source
pub trait Map {
    // Required methods
    fn insert_pair(&mut self, pair: Pair) -> Result<(), Error>;
    fn get_pairs(&self) -> Result<Vec<Pair>, Error>;
    fn merge(&mut self, other: Self) -> Result<(), Error>;
}
Expand description

A trait that describes a PSBT key-value map.

Required Methods§

Source

fn insert_pair(&mut self, pair: Pair) -> Result<(), Error>

Attempt to insert a key-value pair.

Source

fn get_pairs(&self) -> Result<Vec<Pair>, Error>

Attempt to get all key-value pairs.

Source

fn merge(&mut self, other: Self) -> Result<(), Error>

Attempt to merge with another key-value map of the same type.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§