pub struct CodecPemBundleDecodeOptions {
pub max_input_len: u32,
pub max_der_len: u32,
pub max_blocks: u32,
pub syntax_profile: EnumValue<CodecPemSyntaxProfile>,
pub scope: EnumValue<CodecPemDecodeScope>,
}Expand description
Zero bounds select 1.5 MiB input, 1 MiB DER per block and 64 blocks. Unspecified profile and scope select STRICT and ALL respectively.
Fields§
§max_input_len: u32Field 1: max_input_len
max_der_len: u32Field 2: max_der_len
max_blocks: u32Field 3: max_blocks
syntax_profile: EnumValue<CodecPemSyntaxProfile>Field 4: syntax_profile
scope: EnumValue<CodecPemDecodeScope>Field 5: scope
Implementations§
Source§impl CodecPemBundleDecodeOptions
impl CodecPemBundleDecodeOptions
Sourcepub fn with_max_input_len(self, value: u32) -> CodecPemBundleDecodeOptions
pub fn with_max_input_len(self, value: u32) -> CodecPemBundleDecodeOptions
Sets Self::max_input_len to value, consuming and returning self.
Sourcepub fn with_max_der_len(self, value: u32) -> CodecPemBundleDecodeOptions
pub fn with_max_der_len(self, value: u32) -> CodecPemBundleDecodeOptions
Sets Self::max_der_len to value, consuming and returning self.
Sourcepub fn with_max_blocks(self, value: u32) -> CodecPemBundleDecodeOptions
pub fn with_max_blocks(self, value: u32) -> CodecPemBundleDecodeOptions
Sets Self::max_blocks to value, consuming and returning self.
Sourcepub fn with_syntax_profile(
self,
value: impl Into<EnumValue<CodecPemSyntaxProfile>>,
) -> CodecPemBundleDecodeOptions
pub fn with_syntax_profile( self, value: impl Into<EnumValue<CodecPemSyntaxProfile>>, ) -> CodecPemBundleDecodeOptions
Sets Self::syntax_profile to value, consuming and returning self.
Sourcepub fn with_scope(
self,
value: impl Into<EnumValue<CodecPemDecodeScope>>,
) -> CodecPemBundleDecodeOptions
pub fn with_scope( self, value: impl Into<EnumValue<CodecPemDecodeScope>>, ) -> CodecPemBundleDecodeOptions
Sets Self::scope to value, consuming and returning self.
Trait Implementations§
Source§impl Clone for CodecPemBundleDecodeOptions
impl Clone for CodecPemBundleDecodeOptions
Source§fn clone(&self) -> CodecPemBundleDecodeOptions
fn clone(&self) -> CodecPemBundleDecodeOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CodecPemBundleDecodeOptions
impl Debug for CodecPemBundleDecodeOptions
Source§impl Default for CodecPemBundleDecodeOptions
impl Default for CodecPemBundleDecodeOptions
Source§fn default() -> CodecPemBundleDecodeOptions
fn default() -> CodecPemBundleDecodeOptions
Source§impl DefaultInstance for CodecPemBundleDecodeOptions
impl DefaultInstance for CodecPemBundleDecodeOptions
Source§fn default_instance() -> &'static CodecPemBundleDecodeOptions
fn default_instance() -> &'static CodecPemBundleDecodeOptions
Source§impl<'de> Deserialize<'de> for CodecPemBundleDecodeOptions
impl<'de> Deserialize<'de> for CodecPemBundleDecodeOptions
Source§fn deserialize<__D>(
d: __D,
) -> Result<CodecPemBundleDecodeOptions, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
d: __D,
) -> Result<CodecPemBundleDecodeOptions, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Drop for CodecPemBundleDecodeOptions
impl Drop for CodecPemBundleDecodeOptions
Source§impl Message for CodecPemBundleDecodeOptions
impl Message for CodecPemBundleDecodeOptions
Source§fn compute_size(&self, _cache: &mut SizeCache) -> u32
fn compute_size(&self, _cache: &mut SizeCache) -> u32
Returns the total encoded size in bytes.
Accumulates in u64 (which cannot overflow for in-memory
data) and saturates to u32 at return, so a message whose
encoded size exceeds the 2 GiB protobuf limit yields a value
above ::buffa::MAX_MESSAGE_BYTES that the encode entry
points reject, never a silently wrapped size.
Source§fn write_to(&self, _cache: &mut SizeCache, buf: &mut impl EncodeSink)
fn write_to(&self, _cache: &mut SizeCache, buf: &mut impl EncodeSink)
cache (populated by a prior
compute_size call on the same cache). Read moreSource§fn merge_field(
&mut self,
tag: Tag,
buf: &mut impl Buf,
ctx: DecodeContext<'_>,
) -> Result<(), DecodeError>
fn merge_field( &mut self, tag: Tag, buf: &mut impl Buf, ctx: DecodeContext<'_>, ) -> Result<(), DecodeError>
buf. Read moreSource§fn encode(&self, buf: &mut impl EncodeSink)
fn encode(&self, buf: &mut impl EncodeSink)
Source§fn try_encode(&self, buf: &mut impl EncodeSink) -> Result<(), EncodeError>
fn try_encode(&self, buf: &mut impl EncodeSink) -> Result<(), EncodeError>
MAX_MESSAGE_BYTES). Read moreSource§fn encode_with_cache(&self, cache: &mut SizeCache, buf: &mut impl EncodeSink)
fn encode_with_cache(&self, cache: &mut SizeCache, buf: &mut impl EncodeSink)
Source§fn try_encode_with_cache(
&self,
cache: &mut SizeCache,
buf: &mut impl EncodeSink,
) -> Result<(), EncodeError>
fn try_encode_with_cache( &self, cache: &mut SizeCache, buf: &mut impl EncodeSink, ) -> Result<(), EncodeError>
SizeCache,
returning an error instead of panicking if the encoded size exceeds
the 2 GiB protobuf limit (MAX_MESSAGE_BYTES). Clears the cache
first. Read moreSource§fn try_encode_bounded(
&self,
max_bytes: u32,
buf: &mut impl EncodeSink,
) -> Result<u32, EncodeError>
fn try_encode_bounded( &self, max_bytes: u32, buf: &mut impl EncodeSink, ) -> Result<u32, EncodeError>
buf only if its encoded size fits within
max_bytes, using a single size pass that is then reused for the write. Read moreSource§fn try_encode_bounded_with_cache(
&self,
max_bytes: u32,
cache: &mut SizeCache,
buf: &mut impl EncodeSink,
) -> Result<u32, EncodeError>
fn try_encode_bounded_with_cache( &self, max_bytes: u32, cache: &mut SizeCache, buf: &mut impl EncodeSink, ) -> Result<u32, EncodeError>
Source§fn encoded_len(&self) -> u32
fn encoded_len(&self) -> u32
Source§fn try_encoded_len(&self) -> Result<u32, EncodeError>
fn try_encoded_len(&self) -> Result<u32, EncodeError>
MAX_MESSAGE_BYTES). Read moreSource§fn encode_length_delimited(&self, buf: &mut impl EncodeSink)
fn encode_length_delimited(&self, buf: &mut impl EncodeSink)
Source§fn try_encode_length_delimited(
&self,
buf: &mut impl EncodeSink,
) -> Result<(), EncodeError>
fn try_encode_length_delimited( &self, buf: &mut impl EncodeSink, ) -> Result<(), EncodeError>
MAX_MESSAGE_BYTES). Read moreSource§fn try_encode_to_vec(&self) -> Result<Vec<u8>, EncodeError>
fn try_encode_to_vec(&self) -> Result<Vec<u8>, EncodeError>
Vec<u8>, returning an error instead of panicking
if the encoded size exceeds the 2 GiB protobuf limit
(MAX_MESSAGE_BYTES). Read moreSource§fn encode_to_bytes(&self) -> Bytes
fn encode_to_bytes(&self) -> Bytes
bytes::Bytes. Read moreSource§fn try_encode_to_bytes(&self) -> Result<Bytes, EncodeError>
fn try_encode_to_bytes(&self) -> Result<Bytes, EncodeError>
bytes::Bytes, returning an error instead of
panicking if the encoded size exceeds the 2 GiB protobuf limit
(MAX_MESSAGE_BYTES). Read moreSource§fn decode(buf: &mut impl Buf) -> Result<Self, DecodeError>where
Self: Sized,
fn decode(buf: &mut impl Buf) -> Result<Self, DecodeError>where
Self: Sized,
Source§fn decode_from_slice(data: &[u8]) -> Result<Self, DecodeError>where
Self: Sized,
fn decode_from_slice(data: &[u8]) -> Result<Self, DecodeError>where
Self: Sized,
Source§fn decode_length_delimited(buf: &mut impl Buf) -> Result<Self, DecodeError>where
Self: Sized,
fn decode_length_delimited(buf: &mut impl Buf) -> Result<Self, DecodeError>where
Self: Sized,
Source§fn merge_to_limit(
&mut self,
buf: &mut impl Buf,
ctx: DecodeContext<'_>,
limit: usize,
) -> Result<(), DecodeError>
fn merge_to_limit( &mut self, buf: &mut impl Buf, ctx: DecodeContext<'_>, limit: usize, ) -> Result<(), DecodeError>
Source§fn merge_group(
&mut self,
buf: &mut impl Buf,
ctx: DecodeContext<'_>,
field_number: u32,
) -> Result<(), DecodeError>
fn merge_group( &mut self, buf: &mut impl Buf, ctx: DecodeContext<'_>, field_number: u32, ) -> Result<(), DecodeError>
buf, reading fields until an
EndGroup tag with the given field_number is encountered. Read moreSource§fn merge(
&mut self,
buf: &mut impl Buf,
ctx: DecodeContext<'_>,
) -> Result<(), DecodeError>
fn merge( &mut self, buf: &mut impl Buf, ctx: DecodeContext<'_>, ) -> Result<(), DecodeError>
Source§fn merge_from_slice(&mut self, data: &[u8]) -> Result<(), DecodeError>
fn merge_from_slice(&mut self, data: &[u8]) -> Result<(), DecodeError>
Source§fn merge_length_delimited(
&mut self,
buf: &mut impl Buf,
ctx: DecodeContext<'_>,
) -> Result<(), DecodeError>
fn merge_length_delimited( &mut self, buf: &mut impl Buf, ctx: DecodeContext<'_>, ) -> Result<(), DecodeError>
Source§impl MessageName for CodecPemBundleDecodeOptions
impl MessageName for CodecPemBundleDecodeOptions
Source§const PACKAGE: &'static str = "reallyme.codec.v1"
const PACKAGE: &'static str = "reallyme.codec.v1"
Source§const NAME: &'static str = "CodecPemBundleDecodeOptions"
const NAME: &'static str = "CodecPemBundleDecodeOptions"
. between nesting levels. Read moreSource§impl ProtoElemJson for CodecPemBundleDecodeOptions
impl ProtoElemJson for CodecPemBundleDecodeOptions
Source§fn serialize_proto_json<__S>(
v: &CodecPemBundleDecodeOptions,
s: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize_proto_json<__S>(
v: &CodecPemBundleDecodeOptions,
s: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Source§fn deserialize_proto_json<'de, __D>(
d: __D,
) -> Result<CodecPemBundleDecodeOptions, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize_proto_json<'de, __D>(
d: __D,
) -> Result<CodecPemBundleDecodeOptions, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§fn deserialize_proto_json_null<E>() -> Result<Self, E>where
E: Error,
fn deserialize_proto_json_null<E>() -> Result<Self, E>where
E: Error,
null when it is a valid representation of this
protobuf type inside a container. Most protobuf element types reject
null; google.protobuf.Value overrides this for its null variant.