pub struct CodecPemBundleBlock {
pub label: SecretString,
pub der: SecretBytes,
}Expand description
Labels remain exact external PEM text, including labels unknown to Codec. No DER interpretation, trust decision, or certificate filtering is performed.
Fields§
§label: SecretStringSENSITIVE: compatibility labels are arbitrary received UTF-8 text.
Field 1: label
der: SecretBytesSENSITIVE: original decoded DER requires guarded ownership.
Field 2: der
Implementations§
Source§impl CodecPemBundleBlock
impl CodecPemBundleBlock
Sourcepub fn with_label(self, value: impl Into<SecretString>) -> CodecPemBundleBlock
pub fn with_label(self, value: impl Into<SecretString>) -> CodecPemBundleBlock
Sets Self::label to value, consuming and returning self.
Sourcepub fn with_der(self, value: impl Into<SecretBytes>) -> CodecPemBundleBlock
pub fn with_der(self, value: impl Into<SecretBytes>) -> CodecPemBundleBlock
Sets Self::der to value, consuming and returning self.
Trait Implementations§
Source§impl Clone for CodecPemBundleBlock
impl Clone for CodecPemBundleBlock
Source§fn clone(&self) -> CodecPemBundleBlock
fn clone(&self) -> CodecPemBundleBlock
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CodecPemBundleBlock
impl Debug for CodecPemBundleBlock
Source§impl Default for CodecPemBundleBlock
impl Default for CodecPemBundleBlock
Source§fn default() -> CodecPemBundleBlock
fn default() -> CodecPemBundleBlock
Returns the “default value” for a type. Read more
Source§impl DefaultInstance for CodecPemBundleBlock
impl DefaultInstance for CodecPemBundleBlock
Source§fn default_instance() -> &'static CodecPemBundleBlock
fn default_instance() -> &'static CodecPemBundleBlock
Return a reference to the single default instance of this type.
Source§impl<'de> Deserialize<'de> for CodecPemBundleBlock
impl<'de> Deserialize<'de> for CodecPemBundleBlock
Source§fn deserialize<__D>(
d: __D,
) -> Result<CodecPemBundleBlock, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
d: __D,
) -> Result<CodecPemBundleBlock, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Drop for CodecPemBundleBlock
impl Drop for CodecPemBundleBlock
Source§impl Message for CodecPemBundleBlock
impl Message for CodecPemBundleBlock
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)
Write this message’s encoded bytes to a buffer, consuming
nested-message sizes from
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>
Processes a single already-decoded tag and its associated field data
from
buf. Read moreSource§fn encode(&self, buf: &mut impl EncodeSink)
fn encode(&self, buf: &mut impl EncodeSink)
Compute size, then write. This is the primary encoding API. Read more
Source§fn try_encode(&self, buf: &mut impl EncodeSink) -> Result<(), EncodeError>
fn try_encode(&self, buf: &mut impl EncodeSink) -> Result<(), EncodeError>
Encode, returning an error instead of panicking if the encoded size
exceeds the 2 GiB protobuf limit (
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>
Encode with a caller-supplied
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>
Encode this message into
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
Compute the encoded byte size of this message. Read more
Source§fn try_encoded_len(&self) -> Result<u32, EncodeError>
fn try_encoded_len(&self) -> Result<u32, EncodeError>
Compute the encoded byte size, returning an error instead of
panicking if it exceeds the 2 GiB protobuf limit
(
MAX_MESSAGE_BYTES). Read moreSource§fn encode_length_delimited(&self, buf: &mut impl EncodeSink)
fn encode_length_delimited(&self, buf: &mut impl EncodeSink)
Encode this message as a length-delimited byte sequence. Read more
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>
Encode as a length-delimited byte sequence, returning an error
instead of panicking if the encoded size exceeds the 2 GiB protobuf
limit (
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>
Encode to a new
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
Encode this message to a new
bytes::Bytes. Read moreSource§fn try_encode_to_bytes(&self) -> Result<Bytes, EncodeError>
fn try_encode_to_bytes(&self) -> Result<Bytes, EncodeError>
Encode to a new
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,
Decode a message from a buffer.
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,
Decode a message from a byte slice. Read more
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,
Decode a length-delimited message from a buffer. Read more
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>
Merges a group-encoded message from
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>
Merge fields from a buffer into this message. Read more
Source§fn merge_from_slice(&mut self, data: &[u8]) -> Result<(), DecodeError>
fn merge_from_slice(&mut self, data: &[u8]) -> Result<(), DecodeError>
Merge fields from a byte slice into this message. Read more
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>
Merge fields from a length-delimited sub-message payload into this message. Read more
Source§impl MessageName for CodecPemBundleBlock
impl MessageName for CodecPemBundleBlock
Source§const PACKAGE: &'static str = "reallyme.codec.v1"
const PACKAGE: &'static str = "reallyme.codec.v1"
The protobuf package the message is declared in. Read more
Source§const NAME: &'static str = "CodecPemBundleBlock"
const NAME: &'static str = "CodecPemBundleBlock"
The unqualified message name, with
. between nesting levels. Read moreSource§impl PartialEq for CodecPemBundleBlock
impl PartialEq for CodecPemBundleBlock
Source§impl ProtoElemJson for CodecPemBundleBlock
impl ProtoElemJson for CodecPemBundleBlock
Source§fn serialize_proto_json<__S>(
v: &CodecPemBundleBlock,
s: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize_proto_json<__S>(
v: &CodecPemBundleBlock,
s: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value with proto3 JSON semantics.
Source§fn deserialize_proto_json<'de, __D>(
d: __D,
) -> Result<CodecPemBundleBlock, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize_proto_json<'de, __D>(
d: __D,
) -> Result<CodecPemBundleBlock, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize a value with proto3 JSON semantics.
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,
Deserialize a JSON
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.Source§impl Serialize for CodecPemBundleBlock
impl Serialize for CodecPemBundleBlock
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for CodecPemBundleBlock
Source§impl Zeroize for CodecPemBundleBlock
impl Zeroize for CodecPemBundleBlock
impl ZeroizeOnDrop for CodecPemBundleBlock
Auto Trait Implementations§
impl Forget for CodecPemBundleBlock
impl Freeze for CodecPemBundleBlock
impl Move for CodecPemBundleBlock
impl RefUnwindSafe for CodecPemBundleBlock
impl Send for CodecPemBundleBlock
impl Sync for CodecPemBundleBlock
impl Unpin for CodecPemBundleBlock
impl UnsafeUnpin for CodecPemBundleBlock
impl UnwindSafe for CodecPemBundleBlock
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more