pub struct StructType { /* private fields */ }Expand description
A GC struct type — an engine-interned handle (identity by canonical id). Refcounted (#27i):
holds one registration on its rec group; Clone/Drop incref/decref (see handle_id_traits!).
Implementations§
Source§impl StructType
impl StructType
pub fn new( engine: &Engine, fields: impl IntoIterator<Item = FieldType>, ) -> Result<Self>
pub fn with_finality_and_supertype( engine: &Engine, finality: Finality, supertype: Option<&Self>, fields: impl IntoIterator<Item = FieldType>, ) -> Result<Self>
pub fn field(&self, i: usize) -> Option<FieldType>
pub fn fields(&self) -> impl ExactSizeIterator<Item = FieldType>
Trait Implementations§
Source§impl Clone for StructType
impl Clone for StructType
Source§impl Debug for StructType
impl Debug for StructType
Source§impl Drop for StructType
impl Drop for StructType
impl Eq for StructType
Source§impl From<StructType> for HeapType
impl From<StructType> for HeapType
Source§fn from(t: StructType) -> Self
fn from(t: StructType) -> Self
Converts to this type from the input type.
Source§impl Hash for StructType
impl Hash for StructType
Auto Trait Implementations§
impl Freeze for StructType
impl RefUnwindSafe for StructType
impl Send for StructType
impl Sync for StructType
impl Unpin for StructType
impl UnsafeUnpin for StructType
impl UnwindSafe for StructType
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.