API
#encoding/pem
Xu 0.8.8 API
import: #encoding/pem
counts: 2 函数, 1 方法, 1 类型, 0 常量, 0 方法集
PEM decode / encode_to_memory。
struct Block
pub struct Block {
pub typ string
pub keys []string
pub vals []string
pub bytes string
pub rest string
}
用途
公开结构体 `Block`。
参数
typ string- 字段(string)
keys []string- 字段([]string)
vals []string- 字段([]string)
bytes string- 字段(string)
rest string- 字段(string)
decode
pub fn decode(data &string) Block
用途
解码。
参数
data &string- 数据(借用,调用方仍持有;类型 &string)
返回
Block — 该类型的值
encode_to_memory
pub fn encode_to_memory(b &Block) string
用途
编码。
参数
b &Block- b(借用,调用方仍持有;类型 &Block)
返回
string — 结果字符串