pub struct StructTypeDef {
pub name: String,
pub doc_comment: Option<DocComment>,
pub type_params: Option<Vec<TypeParam>>,
pub fields: Vec<StructField>,
pub methods: Vec<MethodDef>,
pub annotations: Vec<Annotation>,
pub native_layout: Option<NativeLayoutBinding>,
}Expand description
Struct type definition — pure data with named fields
type Point { x: number, y: number }
type DataVec<V, K = Timestamp> { index: Vec<K>, data: Vec<V> }Fields§
§name: String§doc_comment: Option<DocComment>§type_params: Option<Vec<TypeParam>>§fields: Vec<StructField>§methods: Vec<MethodDef>Inline method definitions inside the type body
annotations: Vec<Annotation>Annotations applied to the struct (e.g., @derive_debug type Foo { ... })
native_layout: Option<NativeLayoutBinding>Optional native layout metadata for type C.
Trait Implementations§
Source§impl Clone for StructTypeDef
impl Clone for StructTypeDef
Source§fn clone(&self) -> StructTypeDef
fn clone(&self) -> StructTypeDef
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 StructTypeDef
impl Debug for StructTypeDef
Source§impl<'de> Deserialize<'de> for StructTypeDef
impl<'de> Deserialize<'de> for StructTypeDef
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for StructTypeDef
impl RefUnwindSafe for StructTypeDef
impl Send for StructTypeDef
impl Sync for StructTypeDef
impl Unpin for StructTypeDef
impl UnsafeUnpin for StructTypeDef
impl UnwindSafe for StructTypeDef
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