DCField

Struct DCField 

Source
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: bool

Implementations§

Source§

impl DCField

Source

pub fn get_field_id(&self) -> FieldId

Source

pub fn get_field_name(&self) -> String

Source

pub fn has_default_value(&self) -> bool

Source

pub fn validate_ranges(&self, _packed_data: &Datagram) -> bool

Source

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.

Source

pub fn is_bogus_field(&self) -> bool

Source

pub fn is_required(&self) -> bool

Source

pub fn is_broadcast(&self) -> bool

Source

pub fn is_ram(&self) -> bool

Source

pub fn is_db(&self) -> bool

Source

pub fn is_clsend(&self) -> bool

Source

pub fn is_clrecv(&self) -> bool

Source

pub fn is_ownsend(&self) -> bool

Source

pub fn is_ownrecv(&self) -> bool

Source

pub fn is_airecv(&self) -> bool

Source

fn _refresh_default_value(&self)

Trait Implementations§

Source§

impl Debug for DCField

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for DCField

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl LegacyDCHash for DCField

Source§

fn generate_hash(&self, hashgen: &mut DCHashGenerator)

Accumulates the properties of this DC element into the file hash.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.