google-cloud-auth 0.17.2

Google Cloud Platform server application authentication library.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
pub(crate) const EMPTY: &str = "";

pub(crate) trait UnwrapOrEmpty<T> {
    fn unwrap_or_empty(&self) -> T;
}

impl UnwrapOrEmpty<String> for Option<String> {
    fn unwrap_or_empty(&self) -> String {
        match self {
            Some(s) => s.to_string(),
            None => EMPTY.to_string(),
        }
    }
}