pub enum RustCodeItem {
Enumerator {
name: String,
enum_type: Vec<RustCodeEnumType>,
rcf: RustCodeFields,
},
Struct {
name: String,
fields: Vec<RustCodeItemStruct>,
is_root: bool,
rcf: RustCodeFields,
},
Define {
title: String,
value: RustCodeDefineType,
comment: Option<String>,
},
}
Expand description
An instance type on the list.
Variants§
Implementations§
Source§impl RustCodeItem
impl RustCodeItem
pub fn is_enum(&self) -> bool
pub fn is_define(&self) -> bool
pub fn new_struct( strk: &Structure, items: Vec<RustCodeItemStruct>, is_root: bool, ) -> Self
pub fn new_enum(enm: &Enumerator, items: Vec<RustCodeEnumType>) -> Self
pub fn new_enum_arg( name: impl ToString, enm: &RustCodeFields, items: Vec<RustCodeEnumType>, ) -> Self
pub fn new_define( title: &str, value: RustCodeDefineType, comment: Option<String>, ) -> Self
pub fn get_name(&self) -> &str
Trait Implementations§
Source§impl Clone for RustCodeItem
impl Clone for RustCodeItem
Source§fn clone(&self) -> RustCodeItem
fn clone(&self) -> RustCodeItem
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Display for RustCodeItem
impl Display for RustCodeItem
Source§impl Hash for RustCodeItem
impl Hash for RustCodeItem
Source§impl PartialEq for RustCodeItem
impl PartialEq for RustCodeItem
impl Eq for RustCodeItem
impl StructuralPartialEq for RustCodeItem
Auto Trait Implementations§
impl Freeze for RustCodeItem
impl RefUnwindSafe for RustCodeItem
impl Send for RustCodeItem
impl Sync for RustCodeItem
impl Unpin for RustCodeItem
impl UnwindSafe for RustCodeItem
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> 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.