pub trait ToBase64Url {
// Required methods
fn to_base64url(&self) -> String;
fn to_base64url_zeroizing(&self) -> EncodedSecret;
}Expand description
Extension trait for encoding byte data as URL-safe base64 strings (no padding).
Requires feature encoding-base64.
Blanket-implemented for all AsRef<[u8]> types. Uses the RFC 4648 URL-safe
alphabet without = padding. To encode a secret wrapper, call the inherent
to_base64url() method directly (ergonomically safest for single operations), or
use with_secret(|b| b.to_base64url()) for multi-step operations or when
audit-greppability matters.
Required Methods§
Sourcefn to_base64url(&self) -> String
fn to_base64url(&self) -> String
Encode bytes as URL-safe base64 (no padding).
Sourcefn to_base64url_zeroizing(&self) -> EncodedSecret
fn to_base64url_zeroizing(&self) -> EncodedSecret
Encode bytes as URL-safe base64 and wrap the result in crate::EncodedSecret.