Struct dis_rust::common::entity_id_record::EntityIDRecord
source · [−]pub struct EntityIDRecord {
pub simulation_address_record: SimulationAddressRecord,
pub entity_identifier_field: u16,
}
Expand description
Entity ID Record as defined in IEEE 1278.1 standard. Used to communicate the ID of an entity during the simulation.
Fields
simulation_address_record: SimulationAddressRecord
entity_identifier_field: u16
Implementations
sourceimpl EntityIDRecord
impl EntityIDRecord
sourcepub fn new(
site_identifier_field: u16,
application_identifier_field: u16,
entity_identifier_field: u16
) -> Self
pub fn new(
site_identifier_field: u16,
application_identifier_field: u16,
entity_identifier_field: u16
) -> Self
Provides a function to create a new EntityIDRecord. Enforces all entity IDs must be non-zero.
Examples
Creating a new EntityIDRecord at site 1, on application 1, with entity ID 1:
let entity_id_record = EntityIDRecord::new{
site_identifier_field: 1,
application_identifier_field: 1
entity_identifier_field: 1
};
sourcepub fn default(entity_identifier: u16) -> Self
pub fn default(entity_identifier: u16) -> Self
Provides a function to create a default EntityIDRecord. Uses the default SimulationAddressRecord. Enforces all entity IDs must be non-zero.
Examples
Creating a default EntityIDRecord with event ID 2:
let entity_id_record = EntityIDRecord::default(2);
Trait Implementations
sourceimpl Clone for EntityIDRecord
impl Clone for EntityIDRecord
sourcefn clone(&self) -> EntityIDRecord
fn clone(&self) -> EntityIDRecord
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for EntityIDRecord
impl Debug for EntityIDRecord
sourceimpl Default for EntityIDRecord
impl Default for EntityIDRecord
sourcefn default() -> EntityIDRecord
fn default() -> EntityIDRecord
Returns the “default value” for a type. Read more
impl Copy for EntityIDRecord
Auto Trait Implementations
impl RefUnwindSafe for EntityIDRecord
impl Send for EntityIDRecord
impl Sync for EntityIDRecord
impl Unpin for EntityIDRecord
impl UnwindSafe for EntityIDRecord
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more