[][src]Struct wit_writer::Types

pub struct Types<'a> { /* fields omitted */ }

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]

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

impl<'_> Drop for Types<'_>[src]

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]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]