Struct wit_parser::SizeAlign
source · pub struct SizeAlign { /* private fields */ }
Expand description
Collect size and alignment for sub-elements of a structure
Implementations§
source§impl SizeAlign
impl SizeAlign
pub fn fill(&mut self, resolve: &Resolve)
pub fn size(&self, ty: &Type) -> ArchitectureSize
pub fn align(&self, ty: &Type) -> Alignment
pub fn field_offsets<'a>( &self, types: impl IntoIterator<Item = &'a Type>, ) -> Vec<(ArchitectureSize, &'a Type)>
pub fn payload_offset<'a>( &self, tag: Int, cases: impl IntoIterator<Item = Option<&'a Type>>, ) -> ArchitectureSize
pub fn record<'a>(&self, types: impl Iterator<Item = &'a Type>) -> ElementInfo
pub fn params<'a>( &self, types: impl IntoIterator<Item = &'a Type>, ) -> ElementInfo
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SizeAlign
impl RefUnwindSafe for SizeAlign
impl Send for SizeAlign
impl Sync for SizeAlign
impl Unpin for SizeAlign
impl UnwindSafe for SizeAlign
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