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 {
tag: String::from("FOO"),
contents: vec![1, 2, 3, 4],
},
Pem {
tag: String::from("BAR"),
contents: vec![5, 6, 7, 8],
},
];
encode_many_config(&data, EncodeConfig { line_ending: LineEnding::LF });