pub struct LayoutCache {
pub id_to_layout: SeqMap<TypeId, AbiTypeRef>,
pub kind_to_layout: SeqMap<TypeKind, AbiTypeRef>,
pub universal_id_to_layout: SeqMap<u64, AbiTypeRef>,
pub universal_short_id_to_layout: SeqMap<u32, AbiTypeRef>,
}
Fields§
§id_to_layout: SeqMap<TypeId, AbiTypeRef>
§kind_to_layout: SeqMap<TypeKind, AbiTypeRef>
§universal_id_to_layout: SeqMap<u64, AbiTypeRef>
§universal_short_id_to_layout: SeqMap<u32, AbiTypeRef>
Implementations§
Source§impl LayoutCache
impl LayoutCache
pub fn new() -> Self
pub fn layout(&mut self, analyzed_type: &TypeRef) -> AbiTypeRef
pub fn layout_enum_into_tagged_union( &mut self, name: &str, v: &[EnumVariantType], ) -> TaggedUnion
pub fn layout_enum( &mut self, name: &str, variants: &[EnumVariantType], type_id: TypeId, symbol_id: TopLevelSymbolId, ) -> AbiTypeRef
pub fn layout_struct_type( &mut self, struct_type: &AnonymousStructType, name: &str, ) -> StructType
pub fn layout_struct( &mut self, struct_type: &AnonymousStructType, name: &str, type_id: TypeId, ) -> AbiTypeRef
pub fn layout_optional_type( &mut self, inner_type: &TypeRef, type_id: TypeId, ) -> AbiTypeRef
pub fn layout_optional_type_items( &mut self, inner_type: &TypeRef, ) -> TaggedUnion
pub fn layout_tuple_items(&mut self, types: &[TypeRef]) -> TupleType
pub fn layout_tuple( &mut self, types: &[TypeRef], tuple_id: TypeId, ) -> AbiTypeRef
pub fn universal_short_id(&self, short_id: u32) -> &AbiTypeRef
Trait Implementations§
Source§impl Clone for LayoutCache
impl Clone for LayoutCache
Source§fn clone(&self) -> LayoutCache
fn clone(&self) -> LayoutCache
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 moreAuto Trait Implementations§
impl Freeze for LayoutCache
impl RefUnwindSafe for LayoutCache
impl !Send for LayoutCache
impl !Sync for LayoutCache
impl Unpin for LayoutCache
impl UnwindSafe for LayoutCache
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