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>
Available on crate feature alloc
only.
fn encode_pem_string(&self, line_ending: LineEnding) -> Result<String, Error>
alloc
only.Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.