Skip to main content

ToTsValue

Trait ToTsValue 

Source
pub trait ToTsValue {
    // Required method
    fn to_ts_value(&self) -> TsValue;
}
Expand description

从 Rust 类型转换为 TypeScript 值的 trait

Required Methods§

Source

fn to_ts_value(&self) -> TsValue

转换为 TypeScript 值

Implementations on Foreign Types§

Source§

impl ToTsValue for &str

Source§

impl ToTsValue for bool

Source§

impl ToTsValue for f64

Source§

impl ToTsValue for i32

Source§

impl ToTsValue for i64

Source§

impl ToTsValue for i128

Source§

impl ToTsValue for String

Source§

impl ToTsValue for HashMap<TsValue, TsValue>

Source§

impl ToTsValue for HashMap<String, TsValue>

Source§

impl ToTsValue for HashSet<TsValue>

Source§

impl<K: ToString, V: ToTsValue> ToTsValue for Vec<(K, V)>

Source§

impl<T: ToTsValue> ToTsValue for Option<T>

Source§

impl<T: ToTsValue> ToTsValue for Vec<T>

Source§

impl<T: ToTsValue, E: ToString> ToTsValue for Result<T, E>

Implementors§