Function pem::encode_many_config

source ·
pub fn encode_many_config(pems: &[Pem], config: EncodeConfig) -> String
Expand description

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

Same config will be used for each PEM struct.

§Example

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

 let data = vec![
    Pem::new("FOO", [1, 2, 3, 4]),
    Pem::new("BAR", [5, 6, 7, 8]),
  ];
  encode_many_config(&data, EncodeConfig::new().set_line_ending(LineEnding::LF));