base64-string-rs

Crates.iobase64-string-rs
lib.rsbase64-string-rs
version0.0.1
sourcesrc
created_at2021-01-16 12:12:59.178616
updated_at2021-01-16 12:12:59.178616
descriptionA Rust crate for base64 string
homepage
repositoryhttps://github.com/j5ik2o/base64-string-rs
max_upload_size
id342775
size23,548
Junichi Kato (j5ik2o)

documentation

README

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.

Commit count: 15

cargo fmt