Struct wit_encoder::TypeDef
source · pub struct TypeDef { /* private fields */ }
Implementations§
source§impl TypeDef
impl TypeDef
pub fn new(name: impl Into<Ident>, kind: TypeDefKind) -> Self
pub fn record( name: impl Into<Ident>, fields: impl IntoIterator<Item = impl Into<Field>>, ) -> Self
pub fn resource( name: impl Into<Ident>, funcs: impl IntoIterator<Item = impl Into<ResourceFunc>>, ) -> Self
pub fn flags( name: impl Into<Ident>, flags: impl IntoIterator<Item = impl Into<Flag>>, ) -> Self
pub fn variant( name: impl Into<Ident>, cases: impl IntoIterator<Item = impl Into<VariantCase>>, ) -> Self
pub fn enum_( name: impl Into<Ident>, cases: impl IntoIterator<Item = impl Into<EnumCase>>, ) -> Self
pub fn type_(name: impl Into<Ident>, type_: Type) -> Self
pub fn name(&self) -> &Ident
pub fn name_mut(&mut self) -> &mut Ident
pub fn kind(&self) -> &TypeDefKind
pub fn kind_mut(&mut self) -> &mut TypeDefKind
pub fn docs(&mut self, docs: Option<impl Into<Docs>>)
Trait Implementations§
source§impl Ord for TypeDef
impl Ord for TypeDef
source§impl PartialEq for TypeDef
impl PartialEq for TypeDef
source§impl PartialOrd for TypeDef
impl PartialOrd for TypeDef
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for TypeDef
impl StructuralPartialEq for TypeDef
Auto Trait Implementations§
impl Freeze for TypeDef
impl RefUnwindSafe for TypeDef
impl Send for TypeDef
impl Sync for TypeDef
impl Unpin for TypeDef
impl UnwindSafe for TypeDef
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)