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 set_docs(&mut self, docs: Option<impl Into<Docs>>)
pub fn docs(&self) -> &Option<Docs>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TypeDef
impl<'de> Deserialize<'de> for TypeDef
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for TypeDef
impl Ord for TypeDef
Source§impl PartialOrd for TypeDef
impl PartialOrd for TypeDef
impl 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§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.