fp_bindgen/serializable/
bytes.rs1use super::Serializable;
2use crate::types::{CargoDependency, CustomType, Type, TypeIdent};
3use std::collections::{BTreeMap, BTreeSet};
4
5impl Serializable for bytes::Bytes {
6 fn ident() -> TypeIdent {
7 TypeIdent::from("Bytes")
8 }
9
10 fn ty() -> Type {
11 Type::Custom(CustomType {
12 ident: Self::ident(),
13 rs_ty: "bytes::Bytes".to_owned(),
14 rs_dependencies: BTreeMap::from([(
15 "bytes",
16 CargoDependency::with_version_and_features("1", BTreeSet::from(["serde"])),
17 )]),
18 serde_attrs: vec![],
19 ts_ty: "Uint8Array".to_owned(),
20 ts_declaration: None,
21 })
22 }
23}