Struct wasm_bindgen_backend::ast::StructField [−][src]
pub struct StructField {
pub rust_name: Member,
pub js_name: String,
pub struct_name: Ident,
pub readonly: bool,
pub ty: Type,
pub getter: Ident,
pub setter: Ident,
pub comments: Vec<String>,
pub generate_typescript: bool,
}The field of a struct
Fields
rust_name: MemberThe name of the field in Rust code
js_name: StringThe name of the field in JS code
struct_name: IdentThe name of the struct this field is part of
readonly: boolWhether this value is read-only to JS
ty: TypeThe type of this field
getter: IdentThe name of the getter shim for this field
setter: IdentThe name of the setter shim for this field
comments: Vec<String>The doc comments on this field, if any
generate_typescript: boolWhether to generate a typescript definition for this field
Trait Implementations
impl Clone for StructField[src]
impl Clone for StructField[src]fn clone(&self) -> StructField[src]
fn clone(&self) -> StructField[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]Performs copy-assignment from source. Read more
impl ToTokens for StructField[src]
impl ToTokens for StructField[src]fn to_tokens(&self, tokens: &mut TokenStream)[src]
fn to_tokens(&self, tokens: &mut TokenStream)[src]Write self to the given TokenStream. Read more
fn to_token_stream(&self) -> TokenStream[src]
fn to_token_stream(&self) -> TokenStream[src]Convert self directly into a TokenStream object. Read more
fn into_token_stream(self) -> TokenStream[src]
fn into_token_stream(self) -> TokenStream[src]Convert self directly into a TokenStream object. Read more
Auto Trait Implementations
impl RefUnwindSafe for StructField
impl !Send for StructField
impl !Sync for StructField
impl Unpin for StructField
impl UnwindSafe for StructField
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> Spanned for T where
T: Spanned + ?Sized, [src]
impl<T> Spanned for T where
T: Spanned + ?Sized, [src]pub fn span(&self) -> Span[src]
pub fn span(&self) -> Span[src]Returns a Span covering the complete contents of this syntax tree
node, or Span::call_site() if this node is empty. Read more
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more