Trait e_utils::parse::MyParseFormat

source ·
pub trait MyParseFormat {
    // Required methods
    fn parse_all(&self) -> Result<String>;
    fn parse_format(&self) -> Result<String>;
    fn parse_replace<F>(
        &self,
        start: char,
        end: char,
        match_value: F
    ) -> Result<String>
       where F: Fn(String) -> String;
    fn parse_env(&self) -> Result<String>;
    fn parse_path(&self) -> String;
    fn to_value(&self) -> Result<Value>;
}
Expand description

解析格式

Required Methods§

source

fn parse_all(&self) -> Result<String>

解析所有

source

fn parse_format(&self) -> Result<String>

解析特殊关键词

source

fn parse_replace<F>( &self, start: char, end: char, match_value: F ) -> Result<String>
where F: Fn(String) -> String,

解析自定义关键词

source

fn parse_env(&self) -> Result<String>

解析系统环境变量 解析跨平台系统环境变量(windows、linux、mac等)

source

fn parse_path(&self) -> String

解析路径规范,统一’/’

source

fn to_value(&self) -> Result<Value>

转Json Value

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl MyParseFormat for Path

source§

fn parse_format(&self) -> Result<String>

source§

fn parse_env(&self) -> Result<String>

source§

fn to_value(&self) -> Result<Value>

source§

fn parse_all(&self) -> Result<String>

source§

fn parse_path(&self) -> String

source§

fn parse_replace<F>( &self, start: char, end: char, match_value: F ) -> Result<String>
where F: Fn(String) -> String,

Implementors§