XU XUv0.8.8
EN

API

#encoding/pem

import: #encoding/pem

counts: 2 函数, 1 方法, 1 类型, 0 常量, 0 方法集

PEM decode / encode_to_memory。

struct Block

XuAPI
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

XuAPI
pub fn decode(data &string) Block

用途

解码。

参数

data &string
数据(借用,调用方仍持有;类型 &string)

返回

Block — 该类型的值

(Block) header

XuAPI
pub fn (b Block) header(key string) string

用途

`Block` 上的方法:头。

参数

b Block
接收者 Block(值接收者)
key string
键(string)

返回

string — 结果字符串

encode_to_memory

XuAPI
pub fn encode_to_memory(b &Block) string

用途

编码。

参数

b &Block
b(借用,调用方仍持有;类型 &Block)

返回

string — 结果字符串