#encoding/pem
Xu 0.16.0 API
import: #encoding/pem
counts: 2 functions, 1 methods, 1 types, 0 constants, 0 method sets
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
}
Purpose
Structure encapsulating typ, keys, vals, bytes, rest.
Public fields
typ string- field (string)
keys []string- field ([]string)
vals []string- field ([]string)
bytes string- field (string)
rest string- field (string)
decode
pub fn decode(data &string) Block
Purpose
Decode data from encoded representation.
Parameters
data &string- data (read-only borrow; caller keeps the original; type &string)
Returns
Block — a value of this type
encode_to_memory
pub fn encode_to_memory(b &Block) string
Purpose
Encode to memory data.
Parameters
b &Block- b (read-only borrow; caller keeps the original; type &Block)
Returns
string — result string