pub struct Types<'a> { /* private fields */ }
Expand description
Writer for the list of types in a type subsection.
Implementations§
Source§impl Types<'_>
impl Types<'_>
Sourcepub fn add(
&mut self,
nparams: u32,
params: impl FnOnce(&mut Type<'_>),
nresults: u32,
results: impl FnOnce(&mut Type<'_>),
)
pub fn add( &mut self, nparams: u32, params: impl FnOnce(&mut Type<'_>), nresults: u32, results: impl FnOnce(&mut Type<'_>), )
Adds a new type in this type section.
The nparams
argument specifies how many types will be written by the
params
closure, and the nresults argument lists how many times the
results` closure will write out a type.
§Panics
Panics if params
or results
doesn’t write out the same number of
types that are specified.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Types<'a>
impl<'a> RefUnwindSafe for Types<'a>
impl<'a> Send for Types<'a>
impl<'a> Sync for Types<'a>
impl<'a> Unpin for Types<'a>
impl<'a> !UnwindSafe for Types<'a>
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