Struct simics_macro::class::ClassDeriveOpts
source · struct ClassDeriveOpts {Show 15 fields
ident: Ident,
generics: Generics,
data: Data<(), ClassField>,
name: Option<String>,
description: Option<String>,
short_description: Option<String>,
kind: Option<Type>,
skip_alloc: Flag,
skip_init: Flag,
skip_finalize: Flag,
skip_objects_finalize: Flag,
skip_deinit: Flag,
skip_dealloc: Flag,
skip_create: Flag,
attr_value: Flag,
}
Fields§
§ident: Ident
§generics: Generics
§data: Data<(), ClassField>
§name: Option<String>
§description: Option<String>
§short_description: Option<String>
§kind: Option<Type>
§skip_alloc: Flag
§skip_init: Flag
§skip_finalize: Flag
§skip_objects_finalize: Flag
§skip_deinit: Flag
§skip_dealloc: Flag
§skip_create: Flag
§attr_value: Flag
Implementations§
source§impl ClassDeriveOpts
impl ClassDeriveOpts
fn impl_alloc(&self) -> TokenStream2
fn impl_attribute_defaults(&self) -> Vec<TokenStream2>
fn impl_init(&self) -> TokenStream2
fn impl_finalize(&self) -> TokenStream2
fn impl_objects_finalize(&self) -> TokenStream2
fn impl_deinit(&self) -> TokenStream2
fn impl_dealloc(&self) -> TokenStream2
fn impl_name(&self) -> TokenStream2
sourcefn attribute_to_typestring_simple(s: &str) -> TokenStream2
fn attribute_to_typestring_simple(s: &str) -> TokenStream2
The equivalent python type for simple rust types (integers, strings, etc.) including most simple type aliases defined in the Simics API
fn ty_to_typestring(ty: &Type) -> (TokenStream2, Option<TokenStream2>)
fn impl_attributes(&self) -> Vec<TokenStream2>
fn impl_create(&self) -> TokenStream2
fn impl_new(&self) -> TokenStream2
fn impl_ffi(&self) -> TokenStream2
Trait Implementations§
source§impl Debug for ClassDeriveOpts
impl Debug for ClassDeriveOpts
source§impl FromDeriveInput for ClassDeriveOpts
impl FromDeriveInput for ClassDeriveOpts
source§fn from_derive_input(__di: &DeriveInput) -> Result<Self>
fn from_derive_input(__di: &DeriveInput) -> Result<Self>
Create an instance from
syn::DeriveInput
, or return an error.source§impl ToTokens for ClassDeriveOpts
impl ToTokens for ClassDeriveOpts
source§fn to_tokens(&self, tokens: &mut TokenStream2)
fn to_tokens(&self, tokens: &mut TokenStream2)
source§fn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
source§fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
Auto Trait Implementations§
impl Freeze for ClassDeriveOpts
impl RefUnwindSafe for ClassDeriveOpts
impl !Send for ClassDeriveOpts
impl !Sync for ClassDeriveOpts
impl Unpin for ClassDeriveOpts
impl UnwindSafe for ClassDeriveOpts
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> Spanned for T
impl<T> Spanned for T
source§fn span(&self) -> Span
fn span(&self) -> Span
Returns a
Span
covering the complete contents of this syntax tree
node, or Span::call_site()
if this node is empty.