Trait ArgFromStr

Source
pub trait ArgFromStr: Sized {
    // Required method
    fn arg_from_str(s: &str, parent: &str, pos: usize) -> Result<Self, Error>;
}
Expand description

Trait for parsing extension arg from String Parse an argument from s given context of parent and argument position

When parsing all allowed parameters from string, we need to restrict where the parameters can be allowed. For example, csfs() should not have a txout parameter.

All parameters that should be parsed from extensions need to implement this

Required Methods§

Source

fn arg_from_str(s: &str, parent: &str, pos: usize) -> Result<Self, Error>

Parse an argument from s given context of parent and argument position

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.

Implementations on Foreign Types§

Source§

impl ArgFromStr for Asset

Source§

fn arg_from_str(s: &str, parent: &str, _pos: usize) -> Result<Self, Error>

Source§

impl ArgFromStr for Value

Source§

fn arg_from_str(s: &str, parent: &str, _pos: usize) -> Result<Self, Error>

Source§

impl ArgFromStr for String

Source§

fn arg_from_str(s: &str, _parent: &str, _pos: usize) -> Result<Self, Error>

Implementors§