Trait ssh_encoding::EncodePem
source · pub trait EncodePem: Encode + PemLabel {
// Required methods
fn encode_pem<'o>(
&self,
line_ending: LineEnding,
out: &'o mut [u8]
) -> Result<&'o str, Error>;
fn encode_pem_string(
&self,
line_ending: LineEnding
) -> Result<String, Error>;
}
Available on crate feature
pem
only.Expand description
Required Methods§
sourcefn encode_pem<'o>(
&self,
line_ending: LineEnding,
out: &'o mut [u8]
) -> Result<&'o str, Error>
fn encode_pem<'o>( &self, line_ending: LineEnding, out: &'o mut [u8] ) -> Result<&'o str, Error>
Encode this type using the Encode
trait, writing the resulting PEM
document into the provided out
buffer.
sourcefn encode_pem_string(&self, line_ending: LineEnding) -> Result<String, Error>
fn encode_pem_string(&self, line_ending: LineEnding) -> Result<String, Error>
Available on crate feature
alloc
only.