XU XUv0.16.0

#encoding/pem

import: #encoding/pem

counts: 2 functions, 1 methods, 1 types, 0 constants, 0 method sets

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
}

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

XuAPI
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

(Block) header

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

Purpose

Execute header on Block.

Parameters

b Block
The Block instance used by this call (value receiver).
key string
key (string)

Returns

string — result string

encode_to_memory

XuAPI
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