Skip to main content

SecureDecoding

Trait SecureDecoding 

Source
pub trait SecureDecoding { }
Expand description

Marker trait for types that support secure decoding operations.

Automatically implemented for any type that implements AsRef<str>, such as &str, String, etc.

It does not gate the decoding traits: each From*Str blanket is bounded on plain AsRef<str> and does not mention this marker. Nothing in the crate bounds on it; the 0.9 line removed it. Retained here for backwards compatibility.

Like SecureEncoding, this is a marker trait with no methods — it exists to allow trait bounds and extension methods where relevant.

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

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: AsRef<str> + ?Sized> SecureDecoding for T

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