KeyType

Trait KeyType 

Source
pub trait KeyType:
    Copy
    + Ord
    + Eq
    + Hash
    + Debug
    + 'static {
    const STANDARD: &'static [Self];

    // Required methods
    fn unknown_unchecked(val: u8) -> Self;
    fn from_u8(val: u8) -> Self;
    fn into_u8(self) -> u8;
    fn has_key_data(self) -> bool;
    fn present_since(self) -> PsbtVer;
    fn deprecated_since(self) -> Option<PsbtVer>;
    fn is_required(self) -> bool;
    fn is_proprietary(self) -> bool;

    // Provided methods
    fn unknown(val: u8) -> Self { ... }
    fn to_u8(&self) -> u8 { ... }
    fn is_allowed(self, version: PsbtVer) -> bool { ... }
}

Required Associated Constants§

Source

const STANDARD: &'static [Self]

Required Methods§

Provided Methods§

Source

fn unknown(val: u8) -> Self

Source

fn to_u8(&self) -> u8

Source

fn is_allowed(self, version: PsbtVer) -> bool

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§