Expand description
Blob
This crate provides a dedicated Blob
structure for use in storing,
encoding and decoding to/from base-64, with support for type-level encoding
configurations suitable for url-safe base-64.
When serializing, it will encode the binary data as base-64, and when deserializing it can either read and decode a base-64 encoded string or a raw sequence of bytes.
Example using FromStr::from_str
:
extern crate blob;
use std::str::FromStr;
use blob::Blob;
fn main() {
let my_blob: Blob = Blob::from_str("AQIDBAU=").unwrap();
assert_eq!(my_blob, [1, 2, 3, 4, 5]);
}
Structs§
- Blob
- Blob structure containing binary data
Enums§
- Crypt
- As per
crypt(3)
requirements - Standard
- Standard character set with padding.
- Standard
NoPad - Standard character set without padding.
- UrlSafe
- URL-safe character set with padding
- UrlSafe
NoPad - URL-safe character set without padding
Traits§
- Config
- Trait used for statically typed Blob encoding configs