pub struct CustomType {
pub ident: TypeIdent,
pub rs_ty: String,
pub rs_dependencies: BTreeMap<&'static str, CargoDependency>,
pub serde_attrs: Vec<String>,
pub ts_ty: String,
pub ts_declaration: Option<String>,
}Expand description
Used for defining type information for types that are defined externally, or that otherwise require custom treatment.
Fields§
§ident: TypeIdent§rs_ty: StringQualified path to refer to the type in the Rust generators.
rs_dependencies: BTreeMap<&'static str, CargoDependency>Dependencies to add to the Rust plugin’s Cargo.toml to be able to
use the type.
Keys in the map are dependency names as they appear on the left-hand
side of the = in the Cargo.toml [dependencies] section, while the
value describes what comes on the right-hand side.
serde_attrs: Vec<String>Serde attributes to add to fields of this type.
ts_ty: StringName to refer to the type in the TypeScript generator.
ts_declaration: Option<String>Optional declaration, for when ts_ty does not refer to a built-in
type.
Trait Implementations§
Source§impl Clone for CustomType
impl Clone for CustomType
Source§fn clone(&self) -> CustomType
fn clone(&self) -> CustomType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CustomType
impl Debug for CustomType
Source§impl Hash for CustomType
impl Hash for CustomType
Source§impl PartialEq for CustomType
impl PartialEq for CustomType
impl Eq for CustomType
impl StructuralPartialEq for CustomType
Auto Trait Implementations§
impl Freeze for CustomType
impl RefUnwindSafe for CustomType
impl Send for CustomType
impl Sync for CustomType
impl Unpin for CustomType
impl UnwindSafe for CustomType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.