pub enum Record {
Struct(Struct),
NewType(NewType),
TypeAlias(String, HirField),
Enum(Enum),
}
Expand description
an object type in the HIR
Variants§
Implementations§
Source§impl Record
impl Record
pub fn name(&self) -> &str
pub fn len_fields(&self) -> usize
pub fn fields(&self) -> Box<dyn Iterator<Item = &HirField> + '_>
pub fn fields_mut(&mut self) -> Box<dyn Iterator<Item = &mut HirField> + '_>
Sourcepub fn clear_docs(&mut self)
pub fn clear_docs(&mut self)
This is just for debug/testing to simplify output. It’s not used in the actual codegen.
pub fn optional(&self) -> bool
pub fn as_struct(&self) -> Option<&Struct>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Record
impl RefUnwindSafe for Record
impl Send for Record
impl Sync for Record
impl Unpin for Record
impl UnwindSafe for Record
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