Struct libdonet::dcfield::DCField

source ·
pub struct DCField<'dc> {
    keyword_list: DCKeywordList,
    dclass: Option<&'dc DClass<'dc>>,
    strukt: Option<&'dc DCStruct>,
    field_name: String,
    field_id: FieldId,
    field_type: DCTypeDefinition,
    parent_is_dclass: bool,
    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§dclass: Option<&'dc DClass<'dc>>§strukt: Option<&'dc DCStruct>§field_name: String§field_id: FieldId§field_type: DCTypeDefinition§parent_is_dclass: bool§default_value_stale: bool§has_default_value: bool§default_value: Vec<u8>§bogus_field: bool

Implementations§

source§

impl<'dc> DCField<'dc>

source

pub(crate) fn new(name: &str, dtype: DCTypeDefinition) -> Self

source

pub fn get_field_id(&self) -> FieldId

source

pub fn get_field_name(&self) -> String

source

pub fn get_dclass(&self) -> &'static DClass<'_>

source

pub fn set_field_id(&mut self, id: FieldId)

source

pub fn set_field_name(&mut self, name: String)

source

pub fn set_field_type(&mut self, dtype: DCTypeDefinition)

source

pub fn set_field_keyword_list(&mut self, kw_list: DCKeywordList)

source

pub fn set_default_value(&mut self, value: Vec<u8>)

source

pub fn set_bogus_field(&mut self, is_bogus: bool)

source

pub fn set_parent_struct(&mut self, parent: &'dc DCStruct)

source

pub fn set_parent_dclass(&mut self, parent: &'dc DClass<'dc>)

source

pub fn has_default_value(&self) -> bool

source

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

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<'dc> DCHash for DCField<'dc>

source§

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

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

impl<'dc> Debug for DCField<'dc>

source§

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

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

impl<'dc> Display for DCField<'dc>

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'dc> Freeze for DCField<'dc>

§

impl<'dc> !RefUnwindSafe for DCField<'dc>

§

impl<'dc> !Send for DCField<'dc>

§

impl<'dc> !Sync for DCField<'dc>

§

impl<'dc> Unpin for DCField<'dc>

§

impl<'dc> !UnwindSafe for DCField<'dc>

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§

default 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>,

§

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>,

§

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.