grpc 0.8.3

Rust implementation of gRPC
Documentation
1
2
3
4
5
6
7
8
9
10
11
use std::any::Any;

pub fn _any_to_string(any: Box<dyn Any + Send + 'static>) -> String {
    if any.is::<String>() {
        *any.downcast::<String>().unwrap()
    } else if any.is::<&str>() {
        (*any.downcast::<&str>().unwrap()).to_owned()
    } else {
        "unknown any".to_owned()
    }
}