pub struct DCField {
keyword_list: DCKeywordList,
field_name: String,
field_id: FieldId,
field_type: DCTypeDefinition,
default_value_stale: bool,
has_default_value: bool,
default_value: Vec<u8>,
bogus_field: bool,
}Expand description
A field of a Distributed Class. The DCField struct is a base for struct and dclass fields. In the DC language, there are three types of field declarations, which are: plain fields, atomic, and molecular.
Fields§
§keyword_list: DCKeywordList§field_name: String§field_id: FieldId§field_type: DCTypeDefinition§default_value_stale: bool§has_default_value: bool§default_value: Vec<u8>§bogus_field: boolImplementations§
Source§impl DCField
impl DCField
pub fn get_field_id(&self) -> FieldId
pub fn get_field_name(&self) -> String
pub fn has_default_value(&self) -> bool
pub fn validate_ranges(&self, _packed_data: &Datagram) -> bool
Sourcepub fn format_packed_data(
&self,
f: &mut Formatter<'_>,
_data: &[u8],
_show_field_names: bool,
) -> Result
pub fn format_packed_data( &self, f: &mut Formatter<'_>, _data: &[u8], _show_field_names: bool, ) -> Result
Given a blob that represents the packed data for this field, returns a string formatting it for human consumption.
pub fn is_bogus_field(&self) -> bool
pub fn is_required(&self) -> bool
pub fn is_broadcast(&self) -> bool
pub fn is_ram(&self) -> bool
pub fn is_db(&self) -> bool
pub fn is_clsend(&self) -> bool
pub fn is_clrecv(&self) -> bool
pub fn is_ownsend(&self) -> bool
pub fn is_ownrecv(&self) -> bool
pub fn is_airecv(&self) -> bool
fn _refresh_default_value(&self)
Trait Implementations§
Source§impl LegacyDCHash for DCField
impl LegacyDCHash for DCField
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 DCField
impl RefUnwindSafe for DCField
impl Send for DCField
impl Sync for DCField
impl Unpin for DCField
impl UnwindSafe for DCField
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