1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#[macro_use]
pub mod macros;

pub mod prelude;

pub(crate) use set_arc::SetArc;
mod set_arc;

pub(crate) mod zstr;

pub(crate) mod extension_traits;
pub type Str = ::std::borrow::Cow<'static, str>;

#[derive(Default)]
pub struct InvariantLifetimeMarker<'lifetime>(
    ::core::marker::PhantomData<&'lifetime mut &'lifetime ()>,
);

pub fn base64_encode_unpadded(bytes: &[u8]) -> String {
    ::base64::Engine::encode(&::base64::engine::general_purpose::URL_SAFE_NO_PAD, bytes)
}

pub fn base64_decode_unpadded(str: &str) -> Result<Box<[u8]>, ::base64::DecodeError> {
    let v = ::base64::Engine::decode(&::base64::engine::general_purpose::URL_SAFE_NO_PAD, str)?;
    Ok(v.into_boxed_slice())
}