mongodb 3.4.1

The official MongoDB driver for Rust
Documentation
1
2
3
4
5
6
7
8
9
use base64::{engine::general_purpose::STANDARD, DecodeError, Engine as _};

pub(crate) fn encode<T: AsRef<[u8]>>(input: T) -> String {
    STANDARD.encode(input)
}

pub(crate) fn decode<T: AsRef<[u8]>>(input: T) -> Result<Vec<u8>, DecodeError> {
    STANDARD.decode(input)
}