Struct Avx2

pub struct Avx2 { /* private fields */ }

A base64 engine that unconditionally uses AVX2, without runtime detection.

This works in no_std builds. Because it does not check for AVX2 support, it must only be used on a CPU that has it. Only the STANDARD and URL_SAFE alphabets are accelerated, so it is constructed with the Avx2::standard / Avx2::url_safe (checked) or Avx2::standard_unchecked / Avx2::url_safe_unchecked constructors.

Implementations

impl Avx2

fn standard(config: GeneralPurposeConfig) -> Option<Self>

Create an Avx2 engine for the STANDARD alphabet if the running CPU supports AVX2, else None.

Requires the std feature for the detection; in no_std use Avx2::standard_unchecked.

fn url_safe(config: GeneralPurposeConfig) -> Option<Self>

Create an Avx2 engine for the URL_SAFE alphabet if the running CPU supports AVX2, else None.

Requires the std feature for the detection; in no_std use Avx2::url_safe_unchecked.

const unsafe fn standard_unchecked(config: GeneralPurposeConfig) -> Self

Create an Avx2 engine for the STANDARD alphabet without checking for AVX2 support.

Safety

The CPU that will run encode/decode must support AVX2. Using the engine on a CPU without AVX2 is undefined behavior.

const unsafe fn url_safe_unchecked(config: GeneralPurposeConfig) -> Self

Create an Avx2 engine for the URL_SAFE alphabet without checking for AVX2 support.

Safety

The CPU that will run encode/decode must support AVX2. Using the engine on a CPU without AVX2 is undefined behavior.

Trait Implementations

impl Clone for Avx2

fn clone(&self) -> Self

impl Debug for Avx2

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Engine for Avx2

type Config = GeneralPurposeConfig;
type DecodeEstimate = GeneralPurposeEstimate;
fn config(&self) -> &Self::Config
fn padding(&self) -> Symbol

Auto Trait Implementations

impl Freeze for Avx2

impl RefUnwindSafe for Avx2

impl Send for Avx2

impl Sync for Avx2

impl Unpin for Avx2

impl UnsafeUnpin for Avx2

impl UnwindSafe for Avx2

Blanket Implementations

impl<T> Any for Avx2 where T: 'static + ?Sized,

impl<T> Borrow<T> for Avx2 where T: ?Sized,

impl<T> BorrowMut<T> for Avx2 where T: ?Sized,

impl<T> CloneToUninit for Avx2 where T: Clone,

impl<T> From<T> for Avx2

impl<T> ToOwned for Avx2 where T: Clone,

impl<T, U> Into<U> for Avx2 where U: From<T>,

impl<T, U> TryFrom<U> for Avx2 where U: Into<T>,

impl<T, U> TryInto<U> for Avx2 where U: TryFrom<T>,