use crate::ber::EncodingRules;
#[derive(Clone, Copy, Debug)]
pub struct EncoderOptions {
pub(crate) encoding_rules: EncodingRules,
}
impl EncoderOptions {
#[must_use]
pub const fn ber() -> Self {
Self {
encoding_rules: EncodingRules::Ber,
}
}
#[must_use]
pub const fn cer() -> Self {
Self {
encoding_rules: EncodingRules::Cer,
}
}
#[must_use]
pub const fn der() -> Self {
Self {
encoding_rules: EncodingRules::Der,
}
}
#[must_use]
pub fn current_codec(&self) -> crate::Codec {
self.encoding_rules.codec()
}
}