convienient api for type converting for Rust