pub struct Struct {
    pub meta: Option<Meta>,
    pub name: String,
    pub module_name: Option<String>,
    pub visibility: Visibility,
    /* private fields */
}

Fields§

§meta: Option<Meta>§name: String§module_name: Option<String>§visibility: Visibility

Implementations§

§

impl Struct

pub fn is_runtime(&self) -> bool

pub fn is_native(&self) -> bool

pub fn is_send(&self) -> bool

pub fn is_sync(&self) -> bool

pub fn can_initialize(&self) -> bool

pub fn type_hash(&self) -> TypeHash

pub fn type_name(&self) -> &str

pub fn layout(&self) -> &Layout

pub fn fields(&self) -> &[StructField]

pub fn is_compatible(&self, other: &Struct) -> bool

pub fn find_fields<'a>( &'a self, query: StructFieldQuery<'a> ) -> impl Iterator<Item = &'a StructField> + 'a

pub fn find_field<'a>( &'a self, query: StructFieldQuery<'a> ) -> Option<&'a StructField>

pub unsafe fn initialize(&self, pointer: *mut ()) -> bool

pub unsafe fn finalize(&self, pointer: *mut ())

pub unsafe fn initializer(&self) -> Option<unsafe fn(_: *mut ())>

pub unsafe fn finalizer(&self) -> unsafe fn(_: *mut ())

Trait Implementations§

§

impl Debug for Struct

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl From<Struct> for NativeStructBuilder

§

fn from(value: Struct) -> NativeStructBuilder

Converts to this type from the input type.
§

impl From<Struct> for RuntimeStructBuilder

§

fn from(value: Struct) -> RuntimeStructBuilder

Converts to this type from the input type.
§

impl PartialEq<Struct> for Struct

§

fn eq(&self, other: &Struct) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Finalize for T

§

unsafe fn finalize_raw(data: *mut ())

Safety Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> Component for Twhere T: Send + Sync + 'static,