pub struct DCFile {
pub(crate) imports: Vec<DCPythonImport>,
pub(crate) type_defs: Vec<DCTypeDefinition>,
pub(crate) keywords: Vec<DCKeyword>,
pub(crate) structs: Vec<DCStruct>,
pub(crate) dclasses: Vec<DClass>,
pub(crate) all_object_valid: bool,
pub(crate) inherited_fields_stale: bool,
}Expand description
Data model that provides a high level representation of a single, or collection, of DC files and their elements such as class imports, type definitions, structures, and Distributed Classes.
Fields§
§imports: Vec<DCPythonImport>§type_defs: Vec<DCTypeDefinition>§keywords: Vec<DCKeyword>§structs: Vec<DCStruct>§dclasses: Vec<DClass>§all_object_valid: bool§inherited_fields_stale: boolImplementations§
Source§impl DCFile
impl DCFile
Sourcepub fn get_legacy_hash(&self) -> DCFileHash
pub fn get_legacy_hash(&self) -> DCFileHash
Returns a 32-bit hash index associated with this file. This number is guaranteed to be consistent if the contents of the file have not changed, and it is very likely to be different if the contents of the file do change.
Sourcepub fn get_pretty_hash(&self) -> String
pub fn get_pretty_hash(&self) -> String
Returns a string with the hash as a pretty format hexadecimal.
pub fn get_num_imports(&self) -> usize
pub fn get_python_import(&self, index: usize) -> &DCPythonImport
pub fn get_num_keywords(&self) -> usize
pub fn get_keyword(&self, _index: usize) -> &DCKeyword
pub fn has_keyword(&self, _keyword: String) -> bool
pub fn get_num_dclasses(&self) -> usize
pub fn get_dclass(&self, _index: usize) -> &DClass
pub fn get_dclass_by_id(&self, id: DClassId) -> &DClass
pub fn get_dclass_by_name(&self, _name: &str) -> &DClass
pub fn get_num_structs(&self) -> usize
pub fn get_struct(&self, _index: usize) -> &DCStruct
Trait Implementations§
Source§impl LegacyDCHash for DCFile
impl LegacyDCHash for DCFile
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 Freeze for DCFile
impl RefUnwindSafe for DCFile
impl Send for DCFile
impl Sync for DCFile
impl Unpin for DCFile
impl UnwindSafe for DCFile
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