Module prelude
Expand description
Preconfigured engines for common use cases.
These are re-exports of const
engines in crate::engine::general_purpose, renamed with a BASE64_
prefix for those who prefer to use
the entire path to a name.
§Examples
use base64::prelude::{Engine as _, BASE64_STANDARD_NO_PAD};
assert_eq!("c29tZSBieXRlcw", &BASE64_STANDARD_NO_PAD.encode(b"some bytes"));
Constants§
- BASE64_
STANDARD - A GeneralPurpose engine using the alphabet::STANDARD base64 alphabet and PAD config.
- BASE64_
STANDARD_ NO_ PAD - A GeneralPurpose engine using the alphabet::STANDARD base64 alphabet and NO_PAD config.
- BASE64_
URL_ SAFE - A GeneralPurpose engine using the alphabet::URL_SAFE base64 alphabet and PAD config.
- BASE64_
URL_ SAFE_ NO_ PAD - A GeneralPurpose engine using the alphabet::URL_SAFE base64 alphabet and NO_PAD config.
Traits§
- Engine
- An
Engine
provides low-level encoding and decoding operations that all other higher-level parts of the API use. Users of the library will generally not need to implement this.