#base64 #string #format

base64-string-rs

A Rust crate for base64 string

1 unstable release

0.0.1 Jan 16, 2021

#159 in #base64

Download history 40/week @ 2024-07-22 48/week @ 2024-07-29 65/week @ 2024-08-05 30/week @ 2024-08-12 18/week @ 2024-08-19 50/week @ 2024-08-26 1/week @ 2024-09-02 31/week @ 2024-09-09 38/week @ 2024-09-16 56/week @ 2024-09-23 132/week @ 2024-09-30 28/week @ 2024-10-07 13/week @ 2024-10-14 15/week @ 2024-10-21 5/week @ 2024-10-28 22/week @ 2024-11-04

56 downloads per month
Used in 3 crates (2 directly)

MIT/Apache

10KB
175 lines

base64-string-rs

A Rust crate for Base64 string.

Workflow Status crates.io docs.rs dependency status tokei

Install to Cargo.toml

Add this to your Cargo.toml:

[dependencies]
base64-string-rs = "<<version>>"

About Base64String

Base64String is a string type in Base64 format that contains meta-information about the encoding.

Usage

use base64_string_rs::Base64StringFactory;

let str = "0123ABC";
let factory = Base64StringFactory::default();
let encoded = factory.encode_from_string(str);
println!("encoded = {}", encoded);
// encoded = Base64String(value = MDEyM0FCQw, url_safe = false, padding = false)
let decoded = encoded.decode_to_string().unwrap();
println!("decoded = {}", decoded); // 0123ABC

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~1MB
~17K SLoC