项目作者: novacrazy

项目描述 :
Blob serialization/deserialization utilities in Rust
高级语言: Rust
项目地址: git://github.com/novacrazy/blob-rs.git
创建时间: 2017-02-04T09:03:56Z
项目社区:https://github.com/novacrazy/blob-rs

开源协议:

下载


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:

  1. extern crate blob;
  2. use std::str::FromStr;
  3. use blob::Blob;
  4. fn main() {
  5. let my_blob: Blob = Blob::from_str("AQIDBAU=").unwrap();
  6. assert_eq!(my_blob, [1, 2, 3, 4, 5]);
  7. }