Struct donet_core::dclass::DClass
source · pub struct DClass<'dc> {
dcfile: &'dc DCFile<'dc>,
class_name: String,
class_id: DClassId,
is_bogus_class: bool,
class_parents: Vec<&'dc DClass<'dc>>,
constructor: Option<&'dc DCAtomicField<'dc>>,
fields: Vec<&'dc ClassField<'dc>>,
inherited_fields: Vec<&'dc ClassField<'dc>>,
field_name_2_field: FieldName2Field<'dc>,
field_id_2_field: FieldId2Field<'dc>,
}
Expand description
Represents a Distributed Class defined in the DC file. Contains a map of DC Fields, as well as atomic and molecular fields that are declared within the class. Also stores other properties such as its hierarchy.
Fields§
§dcfile: &'dc DCFile<'dc>
§class_name: String
§class_id: DClassId
§is_bogus_class: bool
§class_parents: Vec<&'dc DClass<'dc>>
§constructor: Option<&'dc DCAtomicField<'dc>>
§fields: Vec<&'dc ClassField<'dc>>
§inherited_fields: Vec<&'dc ClassField<'dc>>
§field_name_2_field: FieldName2Field<'dc>
§field_id_2_field: FieldId2Field<'dc>
Implementations§
source§impl<'dc> DClass<'dc>
impl<'dc> DClass<'dc>
pub fn get_field_by_name(&self, name: &str) -> Option<&'dc ClassField<'_>>
pub fn get_name(&self) -> String
pub fn get_dclass_id(&self) -> DClassId
pub fn get_num_parents(&self) -> usize
pub fn get_parent(&self, index: usize) -> Option<&'static DClass<'_>>
pub fn has_constructor(&self) -> bool
pub fn get_constructor(&self) -> Option<&'dc DCAtomicField<'_>>
Trait Implementations§
source§impl<'dc> DCFileConfigAccessor for DClass<'dc>
impl<'dc> DCFileConfigAccessor for DClass<'dc>
fn get_dc_config(&self) -> &DCFileConfig
source§impl<'dc> LegacyDCHash for DClass<'dc>
impl<'dc> LegacyDCHash for DClass<'dc>
source§fn generate_hash(&self, hashgen: &mut DCHashGenerator)
fn generate_hash(&self, hashgen: &mut DCHashGenerator)
Accumulates the properties of this DC element into the file hash.
Auto Trait Implementations§
impl<'dc> Freeze for DClass<'dc>
impl<'dc> RefUnwindSafe for DClass<'dc>
impl<'dc> Send for DClass<'dc>
impl<'dc> Sync for DClass<'dc>
impl<'dc> Unpin for DClass<'dc>
impl<'dc> UnwindSafe for DClass<'dc>
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)