Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

Encoder

Generic trait for encoding data into Base64 format

This trait provides a common interface for encoding various data types into Base64 representation, which is widely used for encoding binary data in text-based formats and data transmission.

Type Parameters

  • T - The input data type to be encoded

Fully qualified path: alexandria_encoding::base64::Encoder

pub trait Encoder<T>

Trait functions

encode

Encodes data into Base64 format

Arguments

  • data - The data to encode

Returns

  • Array<u8> - Base64 encoded representation as bytes

Fully qualified path: alexandria_encoding::base64::Encoder::encode

fn encode(data: T) -> Array<u8>