pub struct CodecSettings { /* private fields */ }Expand description
One complete, immutable ordinary codec policy.
Implementations§
Source§impl CodecSettings
impl CodecSettings
Sourcepub const fn encoded_len(
self,
input_len: usize,
) -> Result<usize, ConstTransformError>
pub const fn encoded_len( self, input_len: usize, ) -> Result<usize, ConstTransformError>
Returns the exact encoded length in const and runtime contexts.
Sourcepub const fn decoded_len(
self,
input: &[u8],
) -> Result<usize, ConstTransformError>
pub const fn decoded_len( self, input: &[u8], ) -> Result<usize, ConstTransformError>
Validates encoded input and returns its exact decoded length.
Sourcepub const fn encode_array<const INPUT: usize, const OUTPUT: usize>(
self,
input: &[u8; INPUT],
) -> Result<[u8; OUTPUT], ConstTransformError>
pub const fn encode_array<const INPUT: usize, const OUTPUT: usize>( self, input: &[u8; INPUT], ) -> Result<[u8; OUTPUT], ConstTransformError>
Encodes into an array whose length must equal the exact result length.
Sourcepub const fn decode_array<const INPUT: usize, const OUTPUT: usize>(
self,
input: &[u8; INPUT],
) -> Result<[u8; OUTPUT], ConstTransformError>
pub const fn decode_array<const INPUT: usize, const OUTPUT: usize>( self, input: &[u8; INPUT], ) -> Result<[u8; OUTPUT], ConstTransformError>
Decodes into an array whose length must equal the exact result length.
Source§impl CodecSettings
impl CodecSettings
Sourcepub const fn alphabet(&self) -> &ValidatedAlphabet
pub const fn alphabet(&self) -> &ValidatedAlphabet
Returns the validated alphabet owned by this specification.
Sourcepub const fn encode_padding(&self) -> EncodePadding
pub const fn encode_padding(&self) -> EncodePadding
Returns the encode-padding policy.
Sourcepub const fn decode_padding(&self) -> DecodePadding
pub const fn decode_padding(&self) -> DecodePadding
Returns the decode-padding policy.
Sourcepub const fn trailing_bits(&self) -> TrailingBits
pub const fn trailing_bits(&self) -> TrailingBits
Returns the trailing-bit policy.
Sourcepub const fn permits_secret_processing(&self) -> bool
pub const fn permits_secret_processing(&self) -> bool
Returns whether the policy is eligible for a future secret codec.
Runtime alphabets are eligible, but padding-indifferent and noncanonical-trailing-bit policies are deliberately excluded.
Trait Implementations§
Source§impl Clone for CodecSettings
impl Clone for CodecSettings
Source§fn clone(&self) -> CodecSettings
fn clone(&self) -> CodecSettings
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 moreimpl Copy for CodecSettings
Source§impl Debug for CodecSettings
impl Debug for CodecSettings
impl Eq for CodecSettings
Source§impl Hash for CodecSettings
impl Hash for CodecSettings
Source§impl PartialEq for CodecSettings
impl PartialEq for CodecSettings
impl StructuralPartialEq for CodecSettings
Auto Trait Implementations§
impl Freeze for CodecSettings
impl RefUnwindSafe for CodecSettings
impl Send for CodecSettings
impl Sync for CodecSettings
impl Unpin for CodecSettings
impl UnsafeUnpin for CodecSettings
impl UnwindSafe for CodecSettings
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