pub struct StructDecl { /* private fields */ }Implementations§
Source§impl StructDecl
impl StructDecl
pub fn new( env: &Env, types: &Types, name: Option<String>, ty: Type<'_>, ) -> Result<Self, ParseError>
pub fn size(&self) -> usize
pub fn alignment(&self) -> usize
pub fn is_forward_decl(&self) -> bool
pub fn base_types(&self) -> &[String]
pub fn fields(&self) -> &[StructField]
pub fn get_field<'a>( &'a self, types: &'a Types, name: &str, ) -> Option<&'a StructField>
pub fn name(&self) -> Option<&str>
pub fn is_class(&self) -> bool
Trait Implementations§
Source§impl Clone for StructDecl
impl Clone for StructDecl
Source§fn clone(&self) -> StructDecl
fn clone(&self) -> StructDecl
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 StructDecl
impl Debug for StructDecl
Source§impl Display for StructDecl
impl Display for StructDecl
impl Eq for StructDecl
Source§impl PartialEq for StructDecl
impl PartialEq for StructDecl
Source§fn eq(&self, other: &StructDecl) -> bool
fn eq(&self, other: &StructDecl) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for StructDecl
Auto Trait Implementations§
impl Freeze for StructDecl
impl RefUnwindSafe for StructDecl
impl Send for StructDecl
impl Sync for StructDecl
impl Unpin for StructDecl
impl UnsafeUnpin for StructDecl
impl UnwindSafe for StructDecl
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.