Function pem::encode_config[][src]

pub fn encode_config(pem: &Pem, config: &EncodeConfig) -> String

Encode a PEM struct into a PEM-encoded data string with additional configuration options

Example

 use pem::{Pem, encode_config, EncodeConfig, LineEnding};

 let pem = Pem {
    tag: String::from("FOO"),
    contents: vec![1, 2, 3, 4],
  };
  encode_config(&pem, &EncodeConfig { line_ending: LineEnding::LF });