[−][src]Struct wit_writer::Types
Writer for the list of types in a type subsection.
Methods
impl<'_> Types<'_>
[src]
pub fn add(
&mut self,
nparams: u32,
params: impl FnOnce(&mut Type),
nresults: u32,
results: impl FnOnce(&mut Type)
)
[src]
&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> Send for Types<'a>
impl<'a> Sync for Types<'a>
impl<'a> Unpin for Types<'a>
impl<'a> !UnwindSafe for Types<'a>
impl<'a> RefUnwindSafe for Types<'a>
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,