Skip to main content

SecureEncoding

Trait SecureEncoding 

Source
pub trait SecureEncoding { }
Expand description

Marker trait for types that support secure encoding operations.

Automatically implemented for any type that implements AsRef<[u8]>, such as &[u8], Vec<u8>, [u8; N], etc. This enables blanket impls of the individual encoding traits (ToHex, ToBase64Url, ToBech32, etc.).

Since this is a marker trait (no methods), it exists only to allow trait bounds and extension methods to be available where appropriate.

Requires at least one encoding-* feature to be enabled.

Implementors§

Source§

impl<T: AsRef<[u8]> + ?Sized> SecureEncoding for T

Available on crate features encoding-hex or encoding-base64 or encoding-bech32 or encoding-bech32m only.